How to Replace WordPress Admin Bar Logo with Your Own Logo

Customizing the WordPress admin experience is an essential part of building polished, white-labeled websites — especially when handing off a project to a client. One of the most recognizable elements in the admin interface is the default WordPress “W” logo located in the top-left corner of the admin bar.

While it links to useful resources, many developers and agencies prefer to remove or replace this logo with their own branding to maintain a cohesive experience. Whether you're working on a client dashboard, a personal project, or a multi-user admin panel, swapping the default logo for your own can make the backend feel more tailored and professional.

In this tutorial, we’ll walk through how to completely remove the default WordPress logo and replace it with a custom image of your choice — all with a simple PHP snippet.

The Code Snippet

Copy and paste the following code into your theme’s functions.php file or a custom functionality plugin:

add_action('admin_bar_menu', 'themesdna_replace_wp_logo', 11); // Use priority 11 to come after default

function themesdna_replace_wp_logo($wp_admin_bar) {
    // Remove the default WordPress logo
    $wp_admin_bar->remove_node('wp-logo');

    // Add a new logo with the same ID and group
    $wp_admin_bar->add_node([
        'id'    => 'wp-logo',
        'title' => '<img src="ADD-YOUR-LOGO-IMAGE-URL-HERE" style="height:20px; margin-top:6px;" alt="Logo">',
        'href'  => admin_url(),
        'meta'  => [
            'title' => 'Go to Dashboard',
        ],
    ]);
}

Step 1: Add Your Logo

Replace the placeholder text ADD-YOUR-LOGO-IMAGE-URL-HERE in the code above with the actual URL of your logo image.

Tip: For best results, use a small, transparent PNG or SVG image sized approximately 20×20 pixels.

Step 2: Change the Link

This change is optional. By default, clicking your logo will bring users to the WordPress Dashboard. You can change this link by editing the 'href' value:

  • admin_url() – Links to the WordPress dashboard
  • home_url() – Links to your site’s homepage
  • 'https://yourdomain.com/support' – Links to any website

Step 3: Adjust Logo Positioning

If your logo appears misaligned, you can tweak the style attribute directly inside the HTML:

style="height:20px; margin-top:6px;"

Increase or decrease margin-top slightly to align the logo vertically within the admin bar.

Conclusion

Replacing the WordPress admin bar logo with your own branding is a small but effective way to make the dashboard feel more polished and personalized. Whether you're branding a site for a client or creating a consistent identity across projects, this tweak adds a professional touch with minimal effort.

Our WordPress Themes

Below are some of our premium WordPress themes. View all our free and premium WordPress themes →
CoolWP PRO WordPress Theme

CoolWP PRO

If you like CoolWP free WordPress Theme, you will love the premium version. CoolWP PRO is very user friendly, feature-rich,...

$25.00
Simple Grid PRO WordPress Theme

Simple Grid PRO

You'll be pleased with the Simple Grid PRO WordPress theme if you have tried the free version. It is a...

$25.00
GridBit PRO WordPress Theme

GridBit PRO

Are you looking for a feature-rich version of the GridBit Free WordPress Theme? Then you will fall in love with...

$25.00
CuteMag PRO WordPress Theme

CuteMag PRO

CuteMag PRO is an more improved and advanced version of CuteMag Free WordPress Theme. When compare with the CuteMag free...

$25.00
NeatBlog PRO WordPress Theme

NeatBlog PRO

NeatBlog PRO WordPress Theme is the advanced, feature-rich version of the NeatBlog Free WordPress Theme. NeatBlog PRO version has color...

$25.00
GridMax PRO WordPress Theme

GridMax PRO

GridMax PRO is a feature-rich, advanced WordPress theme than its free version. If you like GridMax Free WordPress Theme, then...

$25.00
NeatMag PRO WordPress Theme

NeatMag PRO

Do you like the NeatMag Free WordPress Theme?, Then you will love the premium version. NeatMag PRO is very user...

$25.00
BlogWP PRO WordPress Theme

BlogWP PRO

If you like BlogWP free WordPress Theme, you will love the premium version. BlogWP PRO is easy to use, feature-rich,...

$25.00

Can't you choose a single theme? Purchase All Themes for $75.

Save money with our low, one-time price for access to all of our 56 WordPress themes.