Certainly, I’ll help if I can. When exactly do you get this error: is it when you try to save your changes, or when you click a particular button, or when trying to access the menu item that you were trying to hide?
In general, the recommended way to hide a menu item from everyone except Super Admin is to set “extra capability” to super_admin. The “manage_options” capability won’t work here because subsite admins also have it.
Note: In this case, super_admin is a special capability added by Admin Menu Editor. It’s not permanently assigned to any roles or users. AME turns it on/off depending on whether the logged-in user is a Super Admin.
Howdy Janis,
please refer the screenshot for more details. https://ibb.co/kTYgp6
I want the menu button to hide from everyone except super admin.
I tried to change the extra capability to super_admin, but even after that, the plugin is throwing same capability error please this screenshot https://ibb.co/k4C2wm
Hope you can help me to fix this, Thanks.
########################################################################
NOTE: This is really a great plugin and one of the most Fav of mine. Thank you very much for developing this, People like you made the internet beautiful. Have a great Day!
###########################################################################
Thank you the screenshots. It looks like there are two separate messages here.
The first one – i.e. the one that explicitly says “Error” – shows up because it’s not possible to *delete* a menu item that was added by another plugin. You can only hide it. So when you try to delete an item like that, the plugin displays an error message and offers a couple of alternatives, like “hide it from everyone except Administrator”. To prevent this error, please don’t try to delete menus that were created by other plugins, themes or by WordPress itself.
As for the second message (“… field was set to manage_options”), you don’t need to worry about that one. It’s not actually an error. It’s just there to let you know that the plugin changed a setting. I added this message because I was concerned that automatically changing things without telling the user could be confusing.
As for why the error happens even after you’ve changed the capability to super_admin: it’s still a menu item from another plugin, so you still can’t delete it. Usually, just changing “extra capability” to the appropriate value will be enough to hide the menu.
Note: If it’s a top level menu, you might also need to change the extra capability of each of its submenu items to fully hide it.