WordPress Admin Sidebar Plugin Item Removal

Hey Guys,
I am trying to remove a sidebar item in the admin back end. I am using one plugin that works great for renaming and changing the sidebar but It requires me to purchase it to remove certain items so I wanted to use a code and manually do it since it wont go away with any plugins I install. I tried adding a code I found online and added it to the functions.php without any luck. Here are the urls to the plugin menu I’m trying to remove.

wp-admin/admin.php?page=admin-check-for-new-folders
/wp-admin/admin.php?page=mlp-upgrade-to-pro

Code Tried:
[php]/-----------------------------------------------------------------------------------/
/* Remove Unwanted Admin Menu Items /
/
-----------------------------------------------------------------------------------*/

function remove_admin_menu_items() {
$remove_menu_items = array(__(‘admin-check-for-new-folders’));
global $menu;
end ($menu);
while (prev($menu)){
$item = explode(’ ',$menu[key($menu)][0]);
if(in_array($item[0] != NULL?$item[0]:"" , $remove_menu_items)){
unset($menu[key($menu)]);}
}
}

add_action(‘admin_menu’, ‘remove_admin_menu_items’);[/php]

Any help is much appreciated!

You could try the Adminimise plugin it is free, if you don’t want to get into coding.

You should not edit the functions.php file of your theme. You should always create a child theme and put your functions.php changes in the child themes file. This way you can update the parent theme and your changes will still be intact rather than having to remember to re-enter them. There are full details on the Wordpress codex about child themes, they are really easy and a safer way of making changes.

Sponsor our Newsletter | Privacy Policy | Terms of Service