Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save Frithir/912db992f6978e67ccc1bc423f2e81d4 to your computer and use it in GitHub Desktop.
Save Frithir/912db992f6978e67ccc1bc423f2e81d4 to your computer and use it in GitHub Desktop.
Remove Yoast SEO columns from posts and pages
<?php
/********* DO NOT COPY THE PARTS ABOVE THIS LINE *********/
/* Remove Yoast SEO Columns
* Credit: Andrew Norcross http://andrewnorcross.com/
* Last Tested: Jul 06 2017 using Yoast SEO 5.0 on WordPress 4.8
*
* If you have custom post types, you can add additional lines in this format
* add_filter( 'manage_edit-{$post_type}_columns', 'custom_remove_yseo_columns', 10, 1 );
* replacing {$post_type} with the name of the custom post type.
*/
add_filter( 'manage_edit-post_columns', 'yoast_seo_admin_remove_columns', 10, 1 );
add_filter( 'manage_edit-page_columns', 'yoast_seo_admin_remove_columns', 10, 1 );
function yoast_seo_admin_remove_columns( $columns ) {
unset($columns['wpseo-score']);
unset($columns['wpseo-score-readability']);
unset($columns['wpseo-title']);
unset($columns['wpseo-metadesc']);
unset($columns['wpseo-focuskw']);
unset($columns['wpseo-links']);
unset($columns['wpseo-linked']);
return $columns;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment