Remove the WordPress logo from the admin bar

Want to make your WordPress site more “white label” to users who are logged in?

Originally I was just going to remove the icon, but there is a whole wordpress menu under there. Let’s just remove the whole lot!

If you have a child theme in use, you can add the following code snippet to the functions.php file. Otherwise use a plugin like Code Snippets (not affiliated in anyway, it’s just a plugin I use), and create a new snippet. Make sure to “Save and Activate” the snippet.

add_action( 'admin_bar_menu', 'remove_wp_logo', 999 );

function remove_wp_logo( $wp_admin_bar ) {
$wp_admin_bar->remove_node( 'wp-logo' );
}

from the WordPress Codex: https://codex.wordpress.org/Function_Reference/remove_node

Leave a Reply

Your email address will not be published. Required fields are marked *