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

Block Editor: Select on Enter/Return in the Block Inserter Text Input [SnipSnip.pro]

Added: 6 months ago

Last Updated: 6 months ago

ADMIN ONLY • When using Block Editor and searching for the name of a block or pattern, you can hit enter to jump focus to the results, hit enter again to select. This snippet adds JS to the admin foot...

WordPress Admin

AI Verified

1

WPML minor edit on by default

Added: 1 year ago

Last Updated: 7 months ago

Turn on the 'minor edit' option by default, so all pages and posts edits aren't pushed to translations.

WordPress Admin

AI Verified

0

Show content to logged in User only

Added: 9 months ago

Last Updated: 9 months ago

Show content to logged in User only

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...