I want to remove a menu sub-item. But i cant'find the right item to delete. It is a plug caled "New User Approve". And the slug is :/wp-admin/users.php?page=new-user-approve-admin

I don't want to disable the plugin and the functions, just the sub-menu item.

I don't come further than:

   add_action( 'admin_menu', 'remove_admin_menus' );

add_action( 'admin_menu', 'remove_admin_submenus' );

//Remove top level admin menus function remove_admin_menus() {


//Remove sub level admin menus function remove_admin_submenus() { remove_submenu_page( 'users.php', 'users.php?page=new-user-approve-admin' );



function remove_submenu() {

remove_submenu_page( 'users.php', 'users.php?page=new-user-approve-admin' );


add_action( 'admin_menu', 'remove_submenu', 999 );


You'd want to add this code:

add_action( 'admin_menu', 'remove_admin_menus', 999 );
function remove_admin_menus() {
  remove_submenu_page( 'users.php', 'new-user-approve-admin' );

This one will work for sure, tested it, add the code into the "functions.php" file from the main or child theme folder (or plugin, in case you are using it in a plugin):

add_action( 'admin_menu', 'custom_remove_admin_submenus', 999 );
function custom_remove_admin_submenus() {
    remove_submenu_page( 'users.php', 'new-user-approve-admin' );
  • This one works also! Thanks!!! I want to give you a oke also, but that is not possible. joetek was the first so... But thanks again! – Arnolddew Apr 13 '17 at 18:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.