How to disable help and screen options from dashboard using code

Hello guys! Today I will show you how to disable help and screen option from dashboard from wordpress.

WordPress dashboard has default 2 options. ‘help‘ and ‘screen option‘ you can see like my below screenshot.

Add below code in your functions.php file

add_filter( 'contextual_help', 'remove_help_buttun', 999, 3 );
add_filter( 'screen_options_show_screen', 'remove_screen_option' );
function remove_help_buttun( $help_tab, $display_id, $display )
  {
     if( 'dashboard' != $display->base )
     return $help_tab;
     $display->remove_help_tabs();
     return $help_tab;
  }
function remove_screen_option( $visualise )
  {
     global $current_screen;
     if( 'dashboard' == $current_screen->base )
     return false;
     return $visualise;
  }

After adding code check your WP dashboard. The default options ‘help’ and ‘screen option’ are disable from dashboard.

Hopefully this article helpful for you.

Thank you 🙂

Blog Catagory : WORDPRESS