After doing some digging around I’m coming up with a solution that will allow us to customize the login page without using a plugin or editing core WordPress files which would be overridden every time WordPress is updated.
First let’s use a custom logo. This is done in 2 steps:
Step 1:
Upload the logo you want into the “images” folder within the theme folder, example:
wp-content/themes/default/images/logo-login.gif
Step 2:
Add the following code to your functions.php file (the one in your theme):
add_action("login_head", "my_login_head");
function my_login_head() {
echo "
<style>
body.login #login h1 a {
background: url('".get_bloginfo('template_url')."/images/logo-login.gif') no-repeat scroll center top transparent;
height: 90px;
width: 400px;
}
</style>
";
}
You may have to adjust the width and height to fit your logo. If the alignment of your logo isn’t correct just adjust height or width in the above code until it’s the way you want it.
***I’d like to thank Andy Potanin who posted this previously in another thread. Thank him not me ??
Now, I’m trying to change the background color, link colors etc of the login page using a similar solution. I’ll post it when I get it.