Skip to content

How To Change WordPress Login Logo

Every WordPress has a login screen, which is really important as that’s the only way for us to login, lol. There is a WordPress logo in the top of login form on the page, which is not suitable for blogs with public user registration. If your WordPress has public registration enables or it’s a client project, then you might wanna change WordPress login logo and link from the login screen.

Since 3.8 Parker release of WordPress, the WordPress logo on login page has become a round logo, which has caused many problems for the old logo change snippet, which was not for a round logo. Don’t worry we also found a solution of that issue.

Change WordPress Login Logo With A Plugin

If you’re not more of a function.php guy, then you can also change the WordPress logo with a simple plugin called “Custom Login Logo.” You can download Custom Login Logo plugin at this link. Simply activate the plugin and visit the setting page to use built-in media manager to upload and set a login logo and customize your login page.

Change WordPress Login Logo With functions.php

This was is easy as hell. You just need to customize the CSS of login page with functions.php file. The old code to change login logo was:

function custom_login_logo() {
    echo '<style type="text/css">
        h1 a { background-image:url(LOGO-URL) !important;}
    </style>';
}

add_action('login_head', 'custom_login_logo');

So, we’ll just add width and height property to the above code and it will do the work for us:

function custom_login_logo() {
    echo '<style type="text/css">
        h1 a { background-image:url(LOGO-URL) !important; width: auto !important; height:118px !important; background-size: 300px 125px !important;}
    </style>';
}

add_action('login_head', 'custom_login_logo');

In above code, change LOGO-URL with the URL of your logo and change height: and background-size: property to your the size of your login logo. That’s it? Wait…what about changing the WordPress link?

Just add following to your functions.php file:

function my_login_logo_url() {
    return get_bloginfo( 'url' );
}
add_filter( 'login_headerurl', 'my_login_logo_url' );

function my_login_logo_url_title() {
    return 'My Homepage';
}
add_filter( 'login_headertitle', 'my_login_logo_url_title' );

In above code, change My Homepage with the name of your website. Finally, it’s a wrap!

4 thoughts on “How To Change WordPress Login Logo”

Leave a Reply

Your email address will not be published. Required fields are marked *