Remove Yoast Columns From Admin Lists
Hides the SEO score, readability, title, meta description, keyphrase and link count columns Yoast SEO adds to post and page lists.
Opens WPIDE on
Code
// Yoast column keys to hide.
$wpide_yoast_columns = array( 'wpseo-score', 'wpseo-score-readability', 'wpseo-title', 'wpseo-metadesc', 'wpseo-focuskw', 'wpseo-links', 'wpseo-linked' );
add_action( 'current_screen', function ( $screen ) use ( $wpide_yoast_columns ) {
if ( ! $screen || 'edit' !== $screen->base ) {
return;
}
add_filter( "manage_{$screen->id}_columns", function ( $columns ) use ( $wpide_yoast_columns ) {
return array_diff_key( $columns, array_flip( $wpide_yoast_columns ) );
}, 100 );
} );
Notes
Remove a column name from the list to keep that one.
How to add this snippet
- Install WPIDE on your WordPress site (it is free) and open Code Snippets.
- Use snippet above adds it from the library in one click. Or copy the code into a new snippet with the same code type.
- It is added inactive: review the code and settings, then switch it on.