The WordPress login logo does look nice, but wouldn't it be nice to add your own logo? Well, now you can!
Just copy and paste the following code into your theme's functions.php file (custom_functions.php if you're using Thesis). Don't forget to change the image URL and the background-size to the width and height of your image.
function my_custom_login_logo() { ?> <style type="text/css"> h1 a { background-image:url(*YOUR LOGO URL HERE*) !important; background-size: *image width* *image height* !important; width: *image width* !important; height: *image height* !important; } </style> <?php } add_action('login_head', 'my_custom_login_logo');
You can also change the link on the login logo! Again, paste this in your theme's functions.php file.
function custom_loginlogo_url($url) { return 'https://myfrugaltech.com/'; } add_filter( 'login_headerurl', 'custom_loginlogo_url' );
Don't forget to change the URL, otherwise people who click on the login logo will be directed here!
Audrey says
I have a 125 x 125 button as opposed to an actual logo. When I tried putting it in, it ended up looking squished. What size should my logo be to look right, or is there a way to specify the size I am using?
Mitchell Wischmann says
There has been a change to the code above to reflect this. Where the code says background-size, change the values to 125px 125px and see if that solves the problem.