Change the WordPress Login Logo and URL

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: 274px 36px !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 'http://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!

About Mitchell Wischmann

Mitchell is a sophomore in college, and also runs a savings website, FrugalFinders.com. He started this site to share tips and tricks, how-tos, and to offer WordPress blog support.

Comments

  1. 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?

Speak Your Mind

*