rss

Changing the WordPress admin logo

21 Apr, 2010 Admin,Featured

Image by Ludwig Gatzke

Here’s a quick tip for you to change the logo in the WordPress admin area. This is handy when deploying a site for a client and you want them to feel like they’re using their own custom built CMS system.

First step is to upload the image you want to use. You can do this via FTP or using the WordPress media library. Once you have the URL to your image, open your theme’s functions.php file and add the following code:

// custom admin login logo
function custom_login_logo() {
 echo '<style type="text/css">
 h1 a { background-image: url('.get_bloginfo('template_directory').'/images/custom-login-logo.png) !important; }
 </style>';
}
add_action('login_head', 'custom_login_logo');

Change the URL to the background image to the URL of the file you uploaded and presto!

Use this method? Help share this post and tell us how you used it.

8 Comments

  1. Thanks for the quick and dirty way to get that logo WP swapped out! Cheers!

  2. thanks man, worked well for me! By the way, I’m pretty new to wordpress and I’d like you to advise me a good book to learn the basics. Let me know please! Thanks again

  3. This side it a work in progress and you can probably tell that I am new to WordPress. I can not find anywhere either how to literally remove the words “By admin” and “Categories : Uncategorized” OR use a page that I created as the home page instead of inserting a post into the home page. Can you advise at all, please :-)

  4. @Alex

    I’ve bought ‘Head First WordPress’ (O’Reilly) some months ago; It covers the all the basics and some more things you should know; you can find more info right here;
    http://oreilly.com/catalog/9780596805340/

  5. Great tip, thanks! I really want to understand the deeper workings of the WP system though….any advise on where to go for this?

    Let me see if I understand this example fully…

    In lines 2-6 you define a new PHP function (I think I get this).

    On line 7 the ‘add_action’ is the call to a function that the wordpress developers have already written? Where can I view the code for that function and really understand how it works?

    I’m guessing it will apply the second parameter (your new function) to the built-in (built in to WP) ‘login_head’ function.

    Sorry for such a long message – I think I understand, but where/how can I see how all of the WP functions fit together?

    Thanks,
    Matt

  6. I love the helpful info you provide in your articles. I am going to bookmark your blog and check again here regularly. I will be quite certain I will learn lots of new stuff the following! Best of luck for the following!

  7. great info. I have been looking for this one. thanks for sharing.

  8. 1) This form is nearly invisible, I cannot see the textareas where to enter text easily

    bad usability ;=(

    2) this snippet in functions.php does not work with WP 3.5.1 at all

    no reaction

Leave a Reply

About The WordPress Guru

Over the last 4 or 5 years, I’ve been digging into the Wonders of WordPress. From the days when the Classic theme was the shizz until now, WordPress has gone from strength to strength both as the blogging platform of choice for many big players and as a CMS with...

Learn more »