WordPress: Add a custom logo to your login page

Add a custom logo to your login page

You can add a custom logo to your WordPress login page by adding the following code to your functions.php file:

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');