Change WordPress Login Logo and URL

Reading Time: < 1 minute

Why I need to change WordPress Login Logo and URL? — By default, you will have WordPress logo on your login page as shown below:

image-1024x405 Change WordPress Login Logo and URL

To correct this issue, add these function below to your functions.php file.

function my_login_logo_one() { 
	?> 
		<style type="text/css"> 
			body.login h1 a {

				background-image: url('https://link_of_your_image')!important;  
				background-color: transparent!important;
  
			} 
		</style>
	<?php 
} 
add_action( 'login_enqueue_scripts', 'my_login_logo_one' );


function custom_loginlogo_url($url) {
    return 'http://domain.com';
}
add_filter( 'login_headerurl', 'custom_loginlogo_url' );

I hope this will help. 

Was this post helpful?

Leave a Reply