Pro Verified
Hide Wordpress Dashboard Items based on User Role
An expansion of a previous code where you can hide items from the WP Sidebar based on the User Role.
PHP
Voted: 1 by 1 user(s)
Check the user role and what you want to show to them. Always leave the Administrator as able to see all.
Scroll down to see more snippets from this codevault.
The author has indicated that this snippet is compatable up to wordpress version: 6.1
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.
Last modified:
24/03/2024
This snippet has the following status:
Pro Verified
This snippet has been verified by a Code Snippet Pro team member.
Pro Comments:
1
Please see some snippets below related to this snippet..
WordPress Admin
AI Verified
Added: 1 year ago
Last Updated: 3 months ago
This snippet redirects a non-admin user to the URL or page/post of choice.
WordPress Admin
AI Verified
Added: 1 year ago
Last Updated: 1 year ago
Adding custom e-mail addresses for comment moderation or when anyone posts a comment.
WordPress Admin
AI Verified
Added: 11 months ago
Last Updated: 8 months ago
When editing a snippet title, hitting the Enter key will save the snippet.
These are some popular snippets from this users codevault..
Performance
AI Verified
Added: 1 year ago
Last Updated: 1 month ago
Remove Unused Javascript - and improve your Page Speed Insight Score
WooCommerce
Pro Verified
Added: 1 year ago
Last Updated: 1 week ago
Deactivate some WooCommerce Checkout Fields from showing
Elementor
AI Verified
Added: 7 months ago
Last Updated: 1 month ago
This can be used for any WordPress Builder to aid working with CSS Grids.
Category
Snippet Status