WP admin bar – How to hide/replace WordPress icon and blavatars – updated

At the left side of wp admin bar an wordpress icon “W” is shown.

When the user hover it, it lists some wordpress.org links.  Also in multisite installation a wordpress logo (called blavatar) is shown next to each blog name. Also if you have buddypress installed the same blavatar appears in the admin members stats metabox.

A simple way to hide those images or/and replace them with your site favicon is the following.

Just add the functions into your bp-custom.php (or custom.php) file the following:

* Replace wordpress blavatar with site's favicon
function ls_replace_blavatars() {
echo '<style>
#wpadminbar #wp-admin-bar-wp-logo > .ab-item .ab-icon:before {content:" "!important;}
#wpadminbar .quicklinks li .blavatar:before {content:" "!important;}

#wp-admin-bar-wp-logo>.ab-item .ab-icon { background: url("/wp-content/favicon.ico") no-repeat;}
#wpadminbar .quicklinks li div.blavatar { background: url("/wp-content/favicon.ico") no-repeat;}
//for buddypress members stats metabox
div#community-profile-page li.bp-blogs-profile-stats:before {content:" "!important;}
div#community-profile-page li.bp-blogs-profile-stats {background: url("/wp-content/favicon.ico") no-repeat; padding-left:16px}
//end for buddypress stats metabox
add_action('admin_head', 'replace_blavatars');

* Remove wordpress logo/pages from admin bar
* @global type $wp_admin_bar
function ls_admin_bar_remove() {
global $wp_admin_bar;
$wp_admin_bar->remove_menu( 'wp-logo' );

add_action( 'wp_before_admin_bar_render', 'ls_admin_bar_remove', 0 );



  1. 1
    Gray Ayer Says:

    but any idea on how one would go about customizing the blavatar for each site?

  2. 2
    Yapico Says:

    This does exactly what it says it will do, actually removes the blavatar. After a long time searching, this is the only things I have found that works.

  3. 3
    Adam Says:


    Would you please let us know where custom.php file is ?

  4. 5
    Marcelo Says:

    Hello Lenasterg.

    The final code into custom.php is:

    // hide administration page header logo and blavatar
    function remove_admin_logo() {
    echo '#wp-admin-bar-wp-logo{ display: none; }
    img.blavatar { display: none;}
    #wpadminbar .quicklinks li div.blavatar {display:none;}’;

    add_action(‘admin_head’, ‘remove_admin_logo’);

    Does not work. This is the unique code of the file I created my custom.php.

RSS Feed for this entry

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: