WordPress.org

Ready to get started?Download WordPress

Forums

WordPress SEO by Yoast
[resolved] Position SEO Meta box - priority above custom meta boxes (10 posts)

  1. housebg
    Member
    Posted 2 years ago #

    I need a way to make the SEO meta box a low priority, as I'm using with custom post types that have custom meta boxes, and the SEO metabox is showing before all other content.

    I could edit the plugin in the class-metabox.php file to change the 'high' priority to low, but I was really hoping for a solution that didn't have me editing the plugin files.

    Any possibility of an action or filter that would let me change this with code in my custom theme's function's file?

    http://wordpress.org/extend/plugins/wordpress-seo/

  2. Joost de Valk
    Member
    Plugin Author

    Posted 2 years ago #

    Will add a filter in the next release (1.1.7) wpseo_metabox_prio to allow WP SEO metabox priority to be changed :)

    Already added it in trunk so you can test.

  3. housebg
    Member
    Posted 2 years ago #

    Thanks Joost! I finally got to implementing this and it works perfectly :-)

  4. grumo64
    Member
    Posted 1 year ago #

    Can you tell me how to use this filter ?

  5. Steven Jones
    Member
    Posted 1 year ago #

    Yeah would be grateful if someone could show the implementation of this.

  6. rpetersnmt
    Member
    Posted 1 year ago #

    The API docs for WordPress SEO don't show this yet...but I see it in the code of the plugin. I have the following in my functions.php, but it doesn't seem to make any difference. Am I missing something:

    add_filter( 'wpseo_metabox_prio', 'low');

    Thx any/all...

  7. Steven Jones
    Member
    Posted 1 year ago #

    It should remove the edit post columns as well as some of the other stuff that the plugin puts in. Are you sure it hasn't worked? Works for me on all my sites.

  8. Junaid Bhura
    Member
    Posted 1 year ago #

    + 1

    How exactly do you use it? I've tried:

    apply_filters( 'wpseo_metabox_prio', 'low' );

    in my functions.php but doesn't work. I think its because the plugins get loaded before the theme does and its too late to use it in the functions.php file. Is there an elegant way without changing the plugin code?

  9. rpetersnmt
    Member
    Posted 1 year ago #

    Try adding this to your functions.php:

    // Filter Yoast Meta Priority
    add_filter( 'wpseo_metabox_prio', function() { return 'low';});

  10. Junaid Bhura
    Member
    Posted 1 year ago #

    Omg, this works! Thanks, man!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic