Remove Rank Math Columns From Admin Lists
Hides the SEO details, SEO title and description columns Rank Math adds to post, page and product lists.
Opens WPIDE on
Code
// Rank Math column keys to hide.
$wpide_rm_columns = array( 'rank_math_seo_details', 'rank_math_title', 'rank_math_description' );
add_action( 'current_screen', function ( $screen ) use ( $wpide_rm_columns ) {
if ( ! $screen || 'edit' !== $screen->base ) {
return;
}
add_filter( "manage_{$screen->id}_columns", function ( $columns ) use ( $wpide_rm_columns ) {
return array_diff_key( $columns, array_flip( $wpide_rm_columns ) );
}, 100 );
} );
Notes
Remove a key from the list to keep that column.
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.