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

Stop the Scroll! Float the Admin Notice Above the Editor in Code Snippets Pro [SnipSnip.pro]

Added: 5 months ago

Last Updated: 2 days ago

<p>Make the admin notice in Code Snippet Pro float above the editor so your page doesn't scroll away every time you save a snippet. <a href="https://snipsnip.pro/s/787" target="_blank" rel="nofollow n...

WordPress Admin

AI Verified

1

Disable WP Comments

Added: 1 year ago

Last Updated: 7 months ago

Disable WP Comments, the simple way

WordPress Admin

AI Verified

1

Disable automatic scroll-to-notices when adding snippets

Added: 5 months ago

Last Updated: 4 months ago

By default, Code Snippets will scroll the page up so that new notices are visible when editing or adding snippets. This snippet disables that functionality for those who prefer a more consistent editi...

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: 11 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: 1 year ago

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