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 dashboardhome_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.