0

I only need to know using code in my functions.php, how to remove the Help tab and the widget border when it's empty.

I found answers here but they were old and things have changed. I'd like an updated solution to this problem, if there is one.

Screenshot: enter image description here

By the way, I have removed the Screen Options using this code:

function remove_screen_options(){
    return false;
}
add_filter('screen_options_show_screen', 'remove_screen_options');

What do I need to do to remove the Help Tab and the Dashboard widget borders?

  • See this question for the help tab. – Milo Nov 19 '15 at 4:49
  • Hi, thanks, and what about the Widget borders?. – RRGT19 Nov 19 '15 at 14:39
0

The code below will remove the Help Tab and will hide the extra two Dashboard widget areas:

add_action( 'admin_head', 'wpse209151_dashboard_cleanup' );
function wpse209151_dashboard_cleanup() {
    $screen = get_current_screen();

    // Bail if we're not looking at the dashboard
    if ( 'dashboard' !== $screen->base ) {
    return;
    }

    // Deal with the Help Tabs
    $screen->remove_help_tabs();

    // Hide the desired Dashboard widget areas 
    // 4 available widget areas: #postbox-container-1,2,3,4
    echo '<style>
        #postbox-container-3,
        #postbox-container-4 {
            display: none;
        }
    </style>' . "\n\n";
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.