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

MX ยท Add All Post Types to Dashboard "At a Glance"

Added: 7 months ago

Last Updated: 7 months ago

Add all post_types found in the database to the "At a Glance" dashboard widget

WordPress Admin

AI Verified

0

Link Manager

Added: 9 months ago

Last Updated: 9 months ago

Adds the Link manage back again

WordPress Admin

AI Verified

0

Regenerate thumbnails - no extra plugin required.

Added: 1 year ago

Last Updated: 10 months ago

Created new image sizes? Changed themes? This code snippet will force WordPress to regenerate thumbnails without the need for any 3rd party plugin.

Other Snippets in this Codevault

These are some popular snippets from this users codevault..

JavaScript

Unverified

1

Browser Tab Message

Added: 6 months ago

Last Updated: 5 months 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: 6 months ago

Last Updated: 5 months 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: 6 months ago

Last Updated: 5 months 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...