Remove menu item from WordPress admin bar

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #165509
    Locohacker
    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.