Demote Yoast’s meta box priority to ‘low’

The Yoast meta box sits just below the main editor. To demote it, aka, reduce its priority, just add this anonymous function to your theme (or better still, a custom plugin):

add_filter( 'wpseo_metabox_prio', '__return_false' );

Or, you can use the more commonly quoted approach of explicitly stating the meta box’s positional priority to ‘low’:

add_filter( 'wpseo_metabox_prio', 'filter_wpseo_metabox_prio' );
function filter_wpseo_metabox_prio() {
    return 'low';
});

With namespace:

add_filter( 'wpseo_metabox_prio', __NAMESPACE__.'\filter_wpseo_metabox_prio' );
function filter_wpseo_metabox_prio() {
    return 'low';
}

And if you’re a fan of one-liners set the priority with an anonymous function:

add_filter( 'wpseo_metabox_prio', function() {return 'low';} );

Comments

One thought on “Demote Yoast’s meta box priority to ‘low’”
  • […] As with most things in life the answer’s yes! You could manually move them by dragging them to the desired position, but this is a per-user setting, so not ideal if you want to set the default layout for all users. You could use do_meta_boxes() and remove_meta_box() to remove the target meta box, then add it back where required, using add_meta_box() You can even use custom hooks provided by plugins, where they’re available, which is what I used to move the Yoast meta box to the bottom of the screen. […]

Comments are closed.