I am working on a template and I am currently trying to find a solution or method to effectively hide the THEME OPTIONS located in APPEARANCE from another admin user?
I would not like to strip my co-admin from his “admin privileges” and change him to a lower class however I am seeking a possibility to hide this element from him so that he can’t change the main theme options/settings.
Some help would be greatly appreciated.
Thank you very much,
Patrick
You could use the built in WordPress function remove_submenu_page in a function which checked for a specific user ID. You would hook that to admin_head.
However, it should be noted (as per the comments) that using this only hides the menu item it doesn’t completely disable it and it could be accessed directly from the browser. If you really have to keep this other person as an administrator rather than a user with lower privileges, and you have to make sure they cannot access the theme options at all then you should think about using a plugin to create a new user access level with custom capabilities (I say use a plugin as I don’t believe there’s any point in coding that up yourself, you are just reinventing the wheel).