Reputation: 1
I have 3 admin accounts: one admin for me (shows everything) and 2 others where they need admin access to most items.
I was able to hide the main menu items (posts, pages, comments, appearance, etc) in the functions, however what about hiding menu items that are created from a plugin or other ones that are not part of the Wordpress central menu item list?
For example, Contact Form 7 Database creates 'Contact Forms' on the side bar menu or Google Google Site Kit creates 'Site Kit', and I have others where id like to hide them based on the username or user ID.
anyone know how to do that?
Upvotes: 0
Views: 538
Reputation: 85
You can use such a Jewish method, which of course it does not promote, but it is effective:
There is function in wordpress get_role( string $role )
. You can just one of two methods:
Upvotes: 0