3

Customize Your WordPress Login Page With Your Own Logo

This is a great little trick that doesn't require the use of a plugin. Sometimes you may want to use a custom logo on a site. Maybe you are making it for a client, and want to add a little bit more personalization to it. This snippet of code will enable you to change the Wordpress logo on the login page, to whatever image you define. ...
Customize Your WordPress Login Page With Your Own Logo

The Code

This is really very basic, and simple to do. Just open up your functions.php file, and paste this code in. Change the image name logo.png according to the image you plan to use of course, which should be in your theme images folder since it is pointing to the theme directory's /images folder using get_bloginfo('template_directory'). You can see an example of it on the New2WP login page, and while your there, why not join the site!


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

I found this code on WPRecipes originally, and was written by Rami.

Of course you can always choose to use a plugin, and in that case I would suggest using Theme My Login because it makes a login page within your theme. This also means yet another plugin you have to get, and if you have a lot of plugins, you may not want to add another one. This is just one way to not add more confusing options to the admin area.

Shortlink:

Get automatic updates! Subscribe to Our RSS Feed or Get Email Updates sent straight to your inbox!

About the Author

Jared is from Boston working as a web and graphic designer. Also owns the design blog Tweeaks.com, and has designed many other websites powered by Wordpress including the New2WP theme.

Level: Noob

User Comments

( ADD YOURS )

  1. Wow! I can't wait to try this. Up until now I've been hand coding all of my client's websites. I've only just decided to try and offer small businesses wordpress websites so that they can get an affordable website and make changes for themselves. This will really help brand me. Thanks.


  2. I have a love-hate relationship with WP plug-ins, and what you offer here is such a simple, easy and nifty trick for changing the logo, so thank you for sharing!


  3. Great tutorial for noobs. With so many people hopping on the WordPress bandwagon tips like this are more and more useful by greater numbers of people. Thanks for helping folks make these cookie-cutter sites more attractive.

Trackbacks


  1. Avatar

    Your Name
    February 4


    CommentLuv badge