If you ever wanted to make WordPress change logo on Login page or customize it, this snippet can help you.
How to Change logo on Login page using WordPress
Note the following WordPress logo on the login page.
To change it, just add the follow inside of your theme’s functions.php file. If you don’t have this functions.php file, then manually create one.
<?php function customize_login_logo() { //Method 1: echo '<img src="'. get_template_directory_uri() .'/images/logo.jpg" />'; //Method 2: echo '<img src="'. get_bloginfo('template_directory') .'/images/logo.jpg" />'; } add_action('login_head', 'customize_login_logo'); ?>
If you would like the logo to link back to the blog site, you may use the enhanced code below:
<?php function customize_login_logo() { //Method 1: echo '<a href="'. get_bloginfo( 'siteurl' ) .'"> <img src="'. get_template_directory_uri() .'/images/logo.jpg" /> </a>'; //Method 2: echo '<a href="'.get_bloginfo( 'siteurl' ) . '"> <img src="'. get_bloginfo('template_directory') .'/images/logo.jpg" /> </a>'; } add_action('login_head', 'customize_login_logo'); ?>
That’s it!
Do you know of any other way to change or customize the logo on WordPress Login page? If yes, please share it with us in your comments below.