WordPress

How to remove screen options and help links in the admin area?

More than 1 year has passed since last update.

To remove the Help Tab use

add_filter( 'contextual_help', 'mytheme_remove_help_tabs', 999, 3 );
function mytheme_remove_help_tabs($old_help, $screen_id, $screen){
    $screen->remove_help_tabs();
    return $old_help;
}

Or

add_action('admin_head', 'mytheme_remove_help_tabs');
function mytheme_remove_help_tabs() {
    $screen = get_current_screen();
    $screen->remove_help_tabs();
}

And to remove the Screen Options Tab

add_filter('screen_options_show_screen', '__return_false');

You can use this on tour functions.php file or as part of a custom plugin.

<?php
/*
Plugin Name: Remove Tabs
Plugin URI: http://sample.com
Description: Remove Help Tab and Screen Options Tab
Author: sample
Author URI: http://sample.com
*/

/* It will remove the tabs, not hide them with CSS */

add_filter( 'contextual_help', 'mytheme_remove_help_tabs', 999, 3 );
function mytheme_remove_help_tabs($old_help, $screen_id, $screen){
    $screen->remove_help_tabs();
    return $old_help;
}

add_filter('screen_options_show_screen', '__return_false');
?>