Customize the WordPress Login Page with Your Site Icon

The default WordPress login page works perfectly fine, but it’s branded with their icon and the icon links to wordpress.org. Rebranding this page with your Site Icon helps make the login experience custom to your site. The method below uses the site_icon_url() for the background-image: url(), displaying your Site Icon in place of the WordPress icon, and links it to your site’s home page instead of wordpress.org.

Add this to the theme’s functions.php file.

<?php
function evo_login_icon() { ?>
	<style type="text/css">
		.login h1 a {
			background-image: url( <?php site_icon_url() ?> );
			background-size: contain;
			width: 90px;
			height: 90px;
			border-radius: 45px;
		}
	</style>
<?php }
add_action( 'login_head', 'evo_login_icon' );
function evo_login_url() {
	return '/';
}
add_filter( 'login_headerurl', 'evo_login_url' );

Now your Site Icon will display on the login screen and it will link to your site’s home page.