Customize WordPress Login Logo And Link
You may find a plugin for this, but I tell you a good is, it does not need a plugin to do this. WordPress has built-in hook that can be use to make this happen. I my self do not always sort into installing plugin for the simple thing that you want to do with your site.
To change the logo, go to your the theme folder you are currently using and look for the function.php file copy and paste the following code:
add_action("login_head", "my_login_head");
function my_login_head() {
echo "
<style>
body.login #login h1 a {
background: url('image url') no-repeat scroll center top transparent;
}
</style>
";
}The above few lines of code will do the magic.
Please note that the default size of the logo is 80×80 pixel. If your logo is in different size you can add the following CSS definition:
height: your height; width: your width; -webkit-background-size: your width your height; background-size: your width your height;
You final code will look like this:
add_action("login_head", "my_login_head");
function my_login_head() {
echo "
<style>
body.login #login h1 a {
background: url('/wp-content/themes/directorys/images/allaboutiligan-icon.png') no-repeat scroll center top transparent;
height: your height;
width: your width;
-webkit-background-size: your width your height;
background-size: your width your height;
}
</style>
";
}Changing logo title and logo link url:
function loginpage_custom_link() {
return home_url();
}
add_filter('login_headerurl','loginpage_custom_link');
function change_title_on_logo() {
return get_bloginfo('name');
}
add_filter('login_headertitle', 'change_title_on_logo');That’s all! Hope this helps.