Forked from amboutwe/yoast_seo_admin_remove_columns.php
Created
April 16, 2020 14:57
-
-
Save fritexvz/bdbac3449123bc5aefd5bdb2072199c3 to your computer and use it in GitHub Desktop.
Remove Yoast SEO columns from posts and pages
This file contains hidden or 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 | |
/********* DO NOT COPY THE PARTS ABOVE THIS LINE *********/ | |
/* Remove Yoast SEO Columns | |
* Credit: Andrew Norcross http://andrewnorcross.com/ | |
* Last Tested: Jul 06 2017 using Yoast SEO 5.0 on WordPress 4.8 | |
* | |
* If you have custom post types, you can add additional lines in this format | |
* add_filter( 'manage_edit-{$post_type}_columns', 'custom_remove_yseo_columns', 10, 1 ); | |
* replacing {$post_type} with the name of the custom post type. | |
*/ | |
add_filter( 'manage_edit-post_columns', 'yoast_seo_admin_remove_columns', 10, 1 ); | |
add_filter( 'manage_edit-page_columns', 'yoast_seo_admin_remove_columns', 10, 1 ); | |
function yoast_seo_admin_remove_columns( $columns ) { | |
unset($columns['wpseo-score']); | |
unset($columns['wpseo-score-readability']); | |
unset($columns['wpseo-title']); | |
unset($columns['wpseo-metadesc']); | |
unset($columns['wpseo-focuskw']); | |
unset($columns['wpseo-links']); | |
unset($columns['wpseo-linked']); | |
return $columns; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment