-
-
Save chuckreynolds/6171160 to your computer and use it in GitHub Desktop.
remove WordPress SEO columns from admin post tables
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function rkv_remove_columns( $columns ) { | |
// remove the Yoast SEO columns | |
unset( $columns['wpseo-score'] ); | |
unset( $columns['wpseo-title'] ); | |
unset( $columns['wpseo-metadesc'] ); | |
unset( $columns['wpseo-focuskw'] ); | |
return $columns; | |
} | |
add_filter ( 'manage_edit-post_columns', 'rkv_remove_columns' ); |
I resolve my problem by remove all columns with languages and I add custom column with current lang.
Maybe can help someone:
function polylang_extra_columns_head($defaults) {
$defaults['lang'] = 'Lang';
return $defaults;
}
function polylang_extra_columns_content($column_name, $post_ID) {
if ($column_name == 'lang') {
echo strtoupper( pll_get_post_language($post_ID) );
}
}
add_filter('manage_posts_columns', 'polylang_extra_columns_head');
add_action('manage_posts_custom_column', 'polylang_extra_columns_content', 10, 2);
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
works great, but I search some similar functionality.
Hidden all languages and display only one column with flag instead "check", because now I have 11 languages = 11 columns