PHP – WordPress – Hide/Remove WordPress Admin Menus

The given PHP example helps you hide the admin menu options in wordpress.

Code Example:
// Remove Admin Menus
function remove_menu_items() {
	global $menu;
	$restricted = array(
	end ($menu);
	while (prev($menu)) {
		$value = explode(' ',$menu[key($menu)][0]);
		if(in_array($value[0] != NULL?$value[0]:"" , $restricted)){
add_action('admin_menu', 'remove_menu_items');

Post to Twitter Post to Digg Post to Facebook Post to Google Buzz Send Gmail

Leave a Comment

Your email address will not be published. Required fields are marked *