Here is a snippet that allows you to set a custom image on the WordPress login page and set a custom link:
// Change logo on wp-login.php
function my_custom_login_logo() {
echo '<style type="text/css">
h1 a { background-image:url(https://your-domain.com/wp-content/uploads/2023/custom-logo.png) !important; }
</style>';
}
add_action('login_head', 'my_custom_login_logo');
// Change link on logo
add_filter( 'login_headerurl', 'custom_loginlogo_url' );
function custom_loginlogo_url($url) {
return 'https://your-domain.com';
}
Replace
https://your-domain.com/wp-content/uploads/2023/custom-logo.png | with your logo |
https://your-domain.com | with your link |
Was this post helpful?
Let me know if you liked the post. That’s the only way I can improve. 🙂