Screen Option tab only for Admin

I need to show the Screen Option tab in WordPress for Admins only, and hide that tab for the rest of the users. How can I do that?

I found this: How to Hide the WordPress Screen Options Tab

Read More
function remove_screen_options_tab()
{
    return false;
}
add_filter('screen_options_show_screen', 'remove_screen_options_tab');

But it hides it for every user…

Related posts

Leave a Reply

1 comment

  1. Look for functions.php file, inside your theme folder, and add this code:

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

    An admin is the only one that can 'manage_options', so that should work.