AI Verified

Name

Hide "Screen Options" on the Admin Dashboard

About

This snippet hides the "Screen Options" tab on the WordPress Admin Dashboard, except for yourself. This leaves you in sole control over what info panels appear on the Dashboard. With this snippet activated, your client will no longer be able to populate the Dashboard with junk and spammy messages generated by installed plugins. This snippet may well be a good combination when using my "Scrolling Marquee" snippet so that the Dashboard remains clean and organised.

Language

PHP

Rating

Voted: 0 by 0 user(s)

How to Setup Snippet

Very Easy. Paste the snippet into Code Snippets and edit the script with your "Username" and select the "Admin Only" radio button. Save it and you're good to go. Pop on over to your Dashboard > Home and in the "Screen Options" (remember only you can see this option) and select which info panels your clients will be able to see.

Codevault

Bobby_Palmer

Scroll down to see more snippets from this codevault.

Wordpress Compatability

The author has indicated that this snippet is compatable up to wordpress version: 6.1

Our AI bot has checked this snippet is compatable up to wordpress version: 6.1

Code Snippet Plugin Sync

Free & Pro

Download this snippet by clicking the download button, then head over to the Code Snippet Plugin settings in your wordpress admin dashboard, select the import menu then upload this file to import into your wordpress site.

Pro Only (Coming Soon)

You will be able to click a button and sync this snippet to your wordpress site automatically and from your dashboard manage all code snippets across all your wordpress sites that have the Code Snippets Pro plugin installed.

Website/ Profile URL:

https://robert-palmer.co.uk

Snippet Source:

https://robert-palmer.co.uk/

History

Last modified:

07/04/2023

Important Note

This snippet has the following status:

AI Verified

This snippet has been tested by our AI bot, see any comments below.

AI Bot Comments:

Found 0 vulnerabilities

Hide "Screen Options" on the Admin Dashboard

 
                    
1function disable_screen_options() {
2 $user = wp_get_current_user();
3 if ($user->user_login !== 'YOUR USERNAME HERE') {
4 echo '<style>#screen-options-link-wrap{display:none;}</style>';
5 }
6}
7add_action('admin_head', 'disable_screen_options');

0

Related Snippets

Please see some snippets below related to this snippet..

WordPress Admin

AI Verified

0

Hiding "Show Toolbar when viewing site" checkbox on profile page for specific user roles

Added: 11 months ago

Last Updated: 11 months ago

Have a user role that you want to hide "Show Toolbar when viewing site" checkbox on the profile page? This will remove the checkbox on specific user roles so Admins can control who has the admin toolb...

WordPress Admin

AI Verified

0

Restrict-Course-Pages

Added: 3 months ago

Last Updated: 3 months ago

Ever wanted to restrict access to Pages until certain products are purchased? You can even redirect them to a page/post when they try to access prior to logging in.

WordPress Admin

AI Verified

0

Company Details

Added: 8 months ago

Last Updated: 8 months ago

Custom Dashboard Widget for WordPress Admin

Other Snippets in this Codevault

These are some popular snippets from this users codevault..

JavaScript

Unverified

1

Browser Tab Message

Added: 1 year ago

Last Updated: 1 year ago

This snippet replaces the text in the Browser Tab with one of your own whenever the browser tab is not in focus.

JavaScript

Unverified

1

Change Browser Tab Title When Not in Focus

Added: 1 year ago

Last Updated: 1 year ago

Encourage visitors to return to your site by changing the title in the browser tab when it is not in focus. You can see it in action here... https://carpetzone.co.uk/

WordPress Admin

AI Verified

0

Hide "Screen Options" on the Admin Dashboard

Added: 1 year ago

Last Updated: 1 year ago

This snippet hides the "Screen Options" tab on the WordPress Admin Dashboard, except for yourself. This leaves you in sole control over what info panels appear on the Dashboard. With this snippet ac...