Remove the WordPress logo from the admin bar

If you’re like me, you’ve accidentally clicked the WordPress logo in the admin bar a hundred times while meaning to go to the main Dashboard screen. That logo just gets in my way. I already know about WordPress, so I don’t need a link to the “about” page cluttering up my admin bar. Using the simple code below, we can remove the logo and dropdown menu and make things a little easier on us.

function jp_remove_admin_bar_logo() {
  global $wp_admin_bar;
  $wp_admin_bar->remove_menu( 'wp-logo' );
}
add_action( 'wp_before_admin_bar_render', 'jp_remove_admin_bar_logo', 0 );

Leave a Reply