Remove Administration Menus from WordPress

Once logged  into WordPress you’ll notice a number of Administration Menus to the left of the Dashboard screen. For various reasons you may want to hide some of the menu items.

To remove Administration Menus from the Dashboard just add the following PHP code to your functions.php file.In the PHP below, Links and Tools will be removed but you can remove any menu items by just including the name of the menu item into the array (note that the PHP below doesn’t remove the functionality that the menu references, it just removes the menu from the dashboard).

function remove_menus () {
global $menu;
	$restricted = array(__('Links'), __('Tools'));
	end ($menu);
	while (prev($menu)){
		$value = explode(' ',$menu[key($menu)][0]);
		if(in_array($value[0] != NULL?$value[0]:"" , $restricted)){unset($menu[key($menu)]);}
add_action('admin_menu', 'remove_menus');
Australian WordPress Specialist

Australian WordPress Specialists.

OrganicWeb provides leading WordPress solutions. Specialities include developing high converting Websites built with SEO from the ground up. Contact us to get more customers from your Website.

Leave a Reply