Solution:
You can do it without changing the core files, using the hook login_head
, simply add these code inside your functions.php
file and you are done
function custom_login_logo() {
echo '<style type="text/css">
h1 a { background-image:url('.get_bloginfo('template_directory').'/yourImageFolder/login_logo.png) !important; }
</style>';
}
add_action('login_head', 'custom_login_logo');
Update: Also to change the link of the logo to the current site use following code snippet
function custom_login_url() {
return get_bloginfo( 'siteurl' );
}
add_filter( 'login_headerurl', 'custom_login_url' );