Add a custom logo to WordPress’ wp-admin login page

The default image you find when you go to example.org/wp-admin is the WordPress logo. To change this is an image of your choice, let’s say the logo of your company, simply add the following code to your functions.php file which can be found in the wp-content/themes/your-theme directory.

// custom admin login logo
function custom_login_logo() {
	echo '<style type="text/css">
	h1 a { background-image: url(\'/wp-admin/images/wordpress-logo.png\') !important; }
	</style>';
}
add_action('login_head', 'custom_login_logo');

// custom admin login logo URL
function loginpage_custom_link() {
	return 'https://vanhoutte.be/';
}
add_filter('login_headerurl','loginpage_custom_link');

Of course, make sure that the /wp-admin/images/wordpress-logo.png file exists.

 

Author Bio

Thank you for your interest in my blog! On this miniblog, I write mostly short (technical) blog posts that might interest other people. Read more about me or feel free to contact me.

 

Leave a Reply

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