Title: Remove sub menu bare admin
Last modified: February 17, 2020

---

# Remove sub menu bare admin

 *  Resolved [deuns26](https://wordpress.org/support/users/deuns26/)
 * (@deuns26)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/remove-sub-menu-bare-admin/)
 * Hello, I can’t remove the category submenu from the admin bar
 * add_action( ‘admin_menu’, function () {
    if ( ! current_user_can( ‘manage_options’)){
   remove_submenu_page( ‘wpm-testimonial’, ‘wpm-testimonial-category&post_type=wpm-
   testimonial’ );
 *  }
 * }, 999 );
 * thx

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [Miha](https://wordpress.org/support/users/mplusb/)
 * (@mplusb)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/remove-sub-menu-bare-admin/#post-12449995)
 * Hello [@deuns26](https://wordpress.org/support/users/deuns26/),
 * Please replace the code you added with this one:
 *     ```
       // Remove submenus
           function remove_submenu() {
               remove_submenu_page( 'edit.php?post_type=wpm-testimonial', 'edit-tags.php?taxonomy=wpm-testimonial-category&post_type=wpm-testimonial' );
       }
       add_action( 'admin_menu', 'remove_submenu', 999 );
       ```
   
 * This will do it.
 * All the best,
    Mihaela
 *  Thread Starter [deuns26](https://wordpress.org/support/users/deuns26/)
 * (@deuns26)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/remove-sub-menu-bare-admin/#post-12450510)
 * Hello, sorry your code doesn’t work either.
 *  [Miha](https://wordpress.org/support/users/mplusb/)
 * (@mplusb)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/remove-sub-menu-bare-admin/#post-12454451)
 * Hi [@deuns26](https://wordpress.org/support/users/deuns26/),
 * Can you please send me a screenshot to see how you added that code?
    I just double
   checked it and it works on my end – it removes the Categories from the admin 
   menu.
 * Thank you,
    Mihaela

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Remove sub menu bare admin’ is closed to new replies.

 * ![](https://ps.w.org/strong-testimonials/assets/icon-256x256.png?rev=3134855)
 * [Strong Testimonials](https://wordpress.org/plugins/strong-testimonials/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/strong-testimonials/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/strong-testimonials/)
 * [Active Topics](https://wordpress.org/support/plugin/strong-testimonials/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/strong-testimonials/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/strong-testimonials/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Miha](https://wordpress.org/support/users/mplusb/)
 * Last activity: [6 years, 3 months ago](https://wordpress.org/support/topic/remove-sub-menu-bare-admin/#post-12454451)
 * Status: resolved