Remove some menus in WordPress

5 replies
You can remove some menus of the WordPress interface by adding
the following code to the functions.php file of your theme:

PHP Code:
function remove_menu() {
global 
$menu;
unset(
$menu[2]); /* remove the menu "Dashboard" */
unset($menu[5]); /* remove the menu "Posts" */
unset($menu[10]); /* remove the menu "Medias" */
unset($menu[15]); /* remove the menu "Links" */
unset($menu[20]); /* remove the menu "Pages" */
unset($menu[25]); /* remove the menu "Comments" */
unset($menu[60]); /* remove the menu "Appearance" */
unset($menu[65]); /* remove the menu "Plugins" */
unset($menu[70]); /* remove the menu "Users" */
unset($menu[75]); /* remove the menu "Tools" */
unset($menu[80]); /* remove the menu "Settings" */
}

add_action('admin_head''remove_menu'); 
If you prefer to keep one of these menus, simply delete the
corresponding line of code.
#menus #remove #wordpress

Trending Topics