Change WordPress Logo on Login Page

How to Change WordPress Logo on Login Page

in WordPress Admin
Google+ LinkedIn

WordPress provides their own logo on user registration and login pages but sometimes it is required to replace that with your/client logo especially for branding purpose. You can easily change the default WordPress logo on the Login page with the help of admin_head WordPress action.

Here is a simple code snippet that will allow you to change the WordPress login logo.

All you have to do is to copy this code into your theme’s functions.php file and change the logo image url with the image you want to use and it’s done.

// change wordpress logo on login page
function wcs_custom_login_page_logo() {
    echo '<style type="text/css">
              #header-logo {
                  background-image: url(' . get_bloginfo( 'template_directory' ) . '/images/admin-logo.png) !important;
              }
          </style>';
}
add_action( 'admin_head', 'wcs_custom_login_page_logo' );

Isn’t it as simple as eating a pie. Well, may be not that easy but it’s close enough. ;)

Share the love

If you like this snippet, share it with others!

Leave a Reply

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