Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
// Hides Yoast SEO Plugin Field Columns for Author users and below
// @since Jan, 2013
// @author R. Dall
function my_columns_filter( $columns ) {
if( ! current_user_can( 'edit_users' ) )
unset( $columns['wpseo-score'], $columns['wpseo-title'], $columns['wpseo-metadesc'], $columns['wpseo-focuskw'] );
return $columns;
}
// Filter pages, post, CPT
add_filter( 'manage_edit-page_columns', 'my_columns_filter',10, 1 );
add_filter( 'manage_edit-post_columns', 'my_columns_filter',10, 1 );
add_filter( 'manage_edit-surgeon_columns', 'my_columns_filter',10, 1 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.