Free Wordpress Blog Setup

Adding a Custom Dashboard Logo in WordPress for Branding

By Editorial Staff in Themes
Adding a Custom Dashboard Logo in WordPress for Branding

When creating themes for clients, you might want to provide them with some administrative branding. The first and easiest way to do that is by replacing the WordPress logo with your Custom Logo in the admin dashboard.

First you would need to create an image that has the dimensions of 30px wide and 31px tall. This image would need to be transparent either .gif or .png. The image matte color must match the background color which has the hex value of #464646.

Save that image in your theme’s image folder (/wp-content/themes/theme-name/images) and name it whatever you like. In this example we will be naming it custom-logo.gif.

Now open your functions.php file located in your themes folder and add the following function in there:

//hook the administrative header output
add_action('admin_head', 'my_custom_logo');

function my_custom_logo() {
echo '
<style type="text/css">
#header-logo { background-image: url('.get_bloginfo('template_directory').'/images/custom-logo.gif) !important; }
</style>
';
}

By adding this function, you are telling WordPress to add a function my_custom_logo in the field admin_head. This function will replace the original WordPress ‘W’ with your custom logo.

This is how it would look:

Custom Dashboard Logo in WordPress for Branding

This trick is from Jacob Goldman’s Article on Smashing Magazine

What Next?

Digg it
Save This Page
Subscribe to WPBeginner
Stumble it
Free Wordpress Blog Setup

Comments

7 Responses to “Adding a Custom Dashboard Logo in WordPress for Branding”
  1. I can see how this would benefit larger blogs. Having multiple authors logging in many different blogs, it’s good to have your backend stand out. I may have to implement this

  2. how if direct replace image?

  3. Ethan says:

    Thanks for posting this, it’s really simple to do and I think it adds a nice detail for clients.

  4. Great tutorial. I will make that in my personal site that uses WordPress. Congratulations.

  5. Angelia says:

    Unfortunately this is no more in 3.0. I was messing around with it the other day, but, didn’t come up with the proper solution … too tired maybe? but, they have combined what used to be the logo, and the visit site button. So, if you have this implemented, you have no link to the site unfortunately. If anyone works out a fix, I’m sure all of us who’ve implemented this would love to hear it ;-)

Share Your Opinions

Tell us what you're thinking...
and if you want a pic to show with your comment, then get gravatar!

Please make sure that you have read our Comment Policy.

Due to high volume of request from our readers, we are adding this feature that allows you to stay updated with this post's comments without having to participate in the discussion even though we would love your input as always. Don't worry we hate SPAM just as much as you do, so you will never receive any SPAM messages from our site and that's our promise to you.

Subscribe without commenting

Close Bar