X

Remove the screen options tab with screen_options hook

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.



Code Snippet:


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


Code Snippet:


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

Comments  Leave a Reply

Add a Comment

We're glad you have chosen to leave a comment. Please keep in mind that all comments are moderated according to our privacy policy, and all links are nofollow. Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.

WordPress Launch Checklist

The Ultimate WordPress Launch Checklist

We've compiled all the essential checklist items for your next WordPress website launch into one handy ebook.
Yes, Send Me the Free eBook!