Last active
October 17, 2024 22:36
-
-
Save amboutwe/18558a7e681e36c6bfe6e4fb647265ce to your computer and use it in GitHub Desktop.
Remove Yoast SEO columns from posts and pages
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 | |
/********* DO NOT COPY THE PARTS ABOVE THIS LINE *********/ | |
/* Remove Yoast SEO columns for all users site wide | |
* Credit: Andrew Norcross http://andrewnorcross.com/ | |
* Last Tested: Sep 17 2024 using Yoast SEO 23.4 on WordPress 6.6.2 | |
* | |
* If you have custom post types, you can add additional lines in this format | |
* add_filter( 'manage_edit-{$post_type}_columns', 'yoast_seo_admin_remove_columns', 10, 1 ); | |
* replacing {$post_type} with the name of the custom post type. | |
* | |
* Individual users can show/hide columns in 'Screen Options' | |
*/ | |
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']); // SEO score | |
unset($columns['wpseo-score-readability']); | |
unset($columns['wpseo-title']); | |
unset($columns['wpseo-metadesc']); | |
unset($columns['wpseo-focuskw']); // Keyphrase | |
unset($columns['wpseo-links']); // Outgoing internal links | |
unset($columns['wpseo-linked']); // Incoming internal links | |
unset($columns['wpseo-cornerstone']); // Premium only feature | |
return $columns; // Do not remove this line | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@amboutwe Thank you for quick answer. I added this code, but issue is keeping
`add_filter( 'manage_edit-frm_display_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;
}`
All colums in the page " wp-admin/edit.php?post_type=frm_display" have an offset table structure.