
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.

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!
9 Responses
Yes, this is a great hack, particularly for clients’ sites.
Also…just wanted to point out that there’s a typo in the title of this post.
Excellent wordpress hack! Tnx.
Great little recipe and goes brilliantly with the change wordpress login tutorial. Thanks again
Very easy and useful hacks. Thanks for sharing and special thanks for Smashing Magazine.
If you’re looking to change more than just the logo (and not edit any files) you should really check out the Fluency Admin Plugin. It completely restyles the admin interface. After I installed it, it quickly made its way to every other WP installation I had.
http://wordpress.org/extend/plugins/fluency-admin/
So this only works with GIF images? As if i put in a PNG it’s not showing.
great hack, it worked just fine!
Simple, Effective, Perfect!
Keep up the good work mate.
Trackbacks: