If you are developing a WordPress website for a client or if you are creating a membership site with WordPress then you may want to change the logo on WordPress login page for branding.
Its not very difficult to replace the WordPress logo on the login page. Just copy the following code and paste it into functions.php file in your theme’s folder,
function my_custom_login_logo() {
echo '<style type="text/css">
h1 a { background-image:url('.get_bloginfo("template_directory").'/images/agentwp-custom-login-logo.gif) !important; }
<style>';
}
Make sure to change the image path in the code to your own custom logo image.
This will replace the WordPress logo. But the logo will still link to WordPress.org. To change that link (and the title attribute), copy and paste the following code to the functions.php file of your WordPress theme,
return 'http://www.agentwp.com';
}
add_filter('login_headerurl','loginpage_custom_link');
function change_title_on_logo() {
return 'AgentWP | WordPress Developer';
}
add_filter('login_headertitle', 'change_title_on_logo');
This will change the link and title attribute of the logo on WordPress login page. That’s it. Now you have a fully customized and branded WordPress login page.