I want to hide some menus on admin panel: Appearance, Plugins, and Tools.
How to hide it without plugin?
And how can I un-hide them later easily?
I want to hide some menus on admin panel: Appearance, Plugins, and Tools.
How to hide it without plugin?
And how can I un-hide them later easily?
Comments are closed.
You can do this with remove_menu_page. Add the appropriate menu slug in your functions.php of your theme or your plugin.
<?php remove_menu_page( $menu_slug ) ?>
Note that users can still access these menus using a direct link. If you intend to block a user from accessing a menu, you will have to set up a user role and make sure they don’t have the relevant capabilities.
Here is a list of slug examples for the menus included in a clean WordPress install.
can do it with
remove_menu_page()
try out these locations
Remove Menu Item in WordPress Admin Panel
Remove Unwanted Items from the WordPress Admin Sidebar
This is a nice chunk of code from Bill Erickson’s Core Functionality plugin.
Uncomment the restricted array and include the menu items you’d like to hide. The example contains all the menu items for reference.