wordpress snippets last updated   : October 6, 2014
we now have 641 snippets

Remove the screen options tab with screen_options hook

wordpress snippet

If you are looking to customize the WordPress admin a little bit. You can add the first snippet to the functions.php of your wordpress theme and remove the screen options tab completely. The second snippet will remove the screen options tab for everyone but the admin or users with the ability to manage_options. These snippets can be good if you have made modifications to the admin and want to hide these screen options. You may be interested in modifying the help tab by changing the content to add in something custom creating a better experience for your clients.

snippet :  PHPcopy
function remove_screen_options(){
    return false;
}
add_filter('screen_options_show_screen', 'remove_screen_options');
snippet :  PHPcopy
function remove_screen_options(){
   return current_user_can( 'manage_options' );
}
add_filter('screen_options_show_screen', 'remove_screen_options');

Did you like this post? If so please share it with your friends. Thanks!