Post Pic

How to define your own dashboard logo

By default, the “W” WordPress logo is displayed on the top left side of the dashboard. If for some reason, you’”d like to add your own logo, just read this recipe.

The first thing to do is to get your logo ready. Size might be 30*31px and the logo must be uploaded the images directory of your theme dir.
For exemple, if you're using the rockstar theme from WooThemes, your logo must be uploaded to wp-content/themes/rockstar/images.

Once done, open you functions.php file and paste the following code in it:

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>
   ';
}

Thanks to Smashing Magazine for this great hack!

Leave a Comment

* Name, Email, Comment are Required