Custom Logo on the wp-login Page

The code below shows how to add a custom logo to the login page. Specifically, it demonstrates how to replace the WordPress logo with your own logo. While this hack may not offer any practical benefits, it will enhance the attractiveness and appearance of the site, pleasing clients who will see their own logo when logging into the admin panel.

The following code should be added to the theme's functions.php file. Important: The logo (image custom-login-logo.gif) should be located at the specified address (in the images folder in the theme directory).

add_action( 'login_head', 'my_custom_login_logo' );
function my_custom_login_logo(){

	$url = get_bloginfo('template_directory') . '/images/custom-login-logo.gif';

	echo "
	<style>
		h1 a { background-image: url( $url ) !important; }
	</style>
	";
}

For more examples of extending the login page, see here.

The same can be achieved using the "The Custom admin branding" plugin.