Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vyskoczilova/78bd20c6ae7674ae8d87f1d5696fa38b to your computer and use it in GitHub Desktop.
Save vyskoczilova/78bd20c6ae7674ae8d87f1d5696fa38b to your computer and use it in GitHub Desktop.
remove WordPress SEO columns from admin post tables
<?php
function my_manage_columns( $columns ) {
// remove the Yoast SEO columns
unset( $columns['wpseo-score'] );
unset( $columns['wpseo-title'] );
unset( $columns['wpseo-metadesc'] );
unset( $columns['wpseo-focuskw'] );
unset( $columns['wpseo-score-readability'] );
return $columns;
}
function kbnt_column_init() {
add_filter( 'manage_edit-post_columns' , 'my_manage_columns' );
}
add_action( 'admin_init' , 'kbnt_column_init', 999 );
@junaidkbr
Copy link

Last line should be
add_action( 'admin_init' , 'kbnt_column_init', 999 );

@vyskoczilova
Copy link
Author

Thanks, you are right!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment