filter to hide columns only seems to work globally
-
When using the filter to hide the columns in the edit screen (
add_filter( 'the_seo_framework_show_seo_column', '__return_false' );
) it only seems to be working globally.When adding it to a conditional, nothing happens:
add_action( 'current_screen', 'so_hide_seo_cols_wp_help_screen' ); function so_hide_seo_cols_wp_help_screen() { $current_screen = get_current_screen(); if ( $current_screen ->post_type === 'wp-help' ) { add_filter( 'the_seo_framework_seobox_output', '__return_false' ); add_filter( 'the_seo_framework_show_seo_column', '__return_false' ); // doesn't work properly here, only seems to work when applied globally } }
I am trying to hide the columns from the WP Help pages as that is using an internal custom post type only.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘filter to hide columns only seems to work globally’ is closed to new replies.