Remove the Screen Options and Help Tab in Dashboard

How can I remove the 2 panels in WordPress Admin Dashboard?

Insert this code on your functions.php file or plugin:

<?php
/**
* Remove the Screen Options Tab
**/
add_filter( 'screen_options_show_screen', 'wpster_remove_screen_options', 10, 2 );
function wpster_remove_screen_options( $display_boolean, $wp_screen_object ){
    $blacklist = array('post.php', 'post-new.php', 'index.php', 'edit.php');
    if ( in_array( $GLOBALS&#91;'pagenow'&#93;, $blacklist ) ) {
        $wp_screen_object->render_screen_layout();
        $wp_screen_object->render_per_page_options();
        return false;
    }
    return true;
}
/**
* Remove the Help Tab
**/
add_action('admin_head', 'wpster_remove_help_tabs');
function wpster_remove_help_tabs() {
    $screen = get_current_screen();
    $screen->remove_help_tabs();
}
?>

Submit a Comment

Your email address will not be published. Required fields are marked *