Yoast SEO has an obnoxious habit of taking over your admin interface, so it looks something like this:
Notice how much space Yoast takes up. Unless you are hardcore about your SEO, you really don’t want all that screen estate being wasted.
With just a few lines of code inside your themes functions.php file you can go from that crowded mess to this:
Here’s the snippet you need:
//Remove "page analysis" and annoying SEO columns
add_filter( 'wpseo_use_page_analysis', '__return_false' );
//Make sure the SEO box is at the very bottom of the post edit screen
add_filter( 'wpseo_metabox_prio', 'custom_metabox_prio');
function custom_metabox_prio($in)
{
return 'low';
};
//Remove SEO menu from Admin bar
add_action( 'wp_before_admin_bar_render', 'custom_admin_bar_render' );
function custom_admin_bar_render()
{
global $wp_admin_bar;
$wp_admin_bar->remove_menu('wpseo-menu');
}
//Remove "Has been updated" notification and tour bubble.
add_action( 'get_user_metadata', 'custom_get_user_metadata', 10, 4 );
function custom_get_user_metadata($value, $object_id, $meta_key, $single) {
if($meta_key === 'wpseo_ignore_tour') {
return true;
}
if($meta_key === 'wpseo_seen_about_version') {
return defined('WPSEO_VERSION') ? WPSEO_VERSION : null;
}
return $value;
}
You can still change the per-page SEO settings, it just won’t clutter your admin.
It is also possible to remove the SEO box from the post edit screen by going up to Screen Options (top right) and uncheck the “WordPress SEO by Yoast” box.
This post was inspired by the following snippet by Jonathan Warren.