Replace WordPress logo in login page
Have you ever wondered “How to Replace WordPress logo in login page”? Have you ever needed to change the default WordPress logo on the admin login page for a clients website? Here are simple steps to follow to replace wordpress logo in login page.
Follow these steps to replace Word press logo in login page:
- Your logo should be in in .png format with the dimensions as 274 px width and 63px height.
- save it as “login-logo.png”
- Log in to your hosting account using ftp server via filezilla
- Move to the folder yoursite.com/wp-admin/images/
- Upload the image “login-logo.png“ to the folder (It will give you warning that the image with the same name already exists)
- Click on OK to replace it and then refresh the page.
- Now open the yoursite.com/wp-login.php ,you will see that the default logo of WordPress is replaced by your own logo
OR
Just paste the below code into theme’s functions.php file and put a replacement logo inside your theme’s images/directory named “login-logo.png” with a size of 274 px x 63px
1
2
3
4
5
6
7
8
9
|
/**
* Custom admin login header logo
*/
function custom_login_logo() {
echo ‘<style type=”text/css”>’.
‘h1 a { background-image:url(‘.get_bloginfo( ‘template_directory’ ).’/images/login-logo.png) !important; }’.
‘</style>’;
}
add_action( ‘login_head’, ‘custom_login_logo’ );
|