Skip to content

Remove menu item from WordPress admin bar

  • This topic has 0 replies, 1 voice, and was last updated 1 year ago by Admin.
Viewing 1 post (of 1 total)
  • Author
    Posts
  • #165509
    Admin
    Administrator

    This is how you remove menu item from WordPress admin bar. In this case I want to remove the Notes menu item. Add this to your themes function.

    // remove notes menu from the admin bar
    function mytheme_admin_bar_render() {
    	global $wp_admin_bar;
    	$wp_admin_bar->remove_menu('notes');
    }
    add_action( 'wp_before_admin_bar_render', 'mytheme_admin_bar_render' );
Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.