WordPress remove Yoast SEO post filters

Yoast SEO is a great SEO tool, I install it on most of the websites I build, but somes times I just dont need or want the filters it adds at the top of the admin posts pages. The most annoying one is when it adds it to products on a WooCommerce store.

Below snippet will remove the Yoast SEO filters from admin.

This could be upgraded for future use, for example only remove fields on WooCommerce product lists.

 * Remove Yoast SEO Filters
function custom_remove_yoast_seo_admin_filters() {
	global $wpseo_meta_columns;
	if ($wpseo_meta_columns) {
		remove_action('restrict_manage_posts', array($wpseo_meta_columns, 'posts_filter_dropdown'));
		remove_action('restrict_manage_posts', array($wpseo_meta_columns, 'posts_filter_dropdown_readability'));
add_action('admin_init', 'custom_remove_yoast_seo_admin_filters', 20);

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.