How to design your own WordPress Login Page

Share this:

1x1.trans How to design your own WordPress Login Page

We often see many version of WordPress updates but nothing really changes except bug fixes, improvement in features, and other stuff. The default theme only release each year but not the login page for users and administrator. In our previous post, I show you how to customize your WordPress Dashboard with different kind of plugins. However, you may not like it because it focused much in the inside rather than the outside. In other words, this tutorial will only show you how to design or at least modify the Login page in WordPress. The good thing is that you do not need to install any extra plugins. I know, less is more!

Before going to the actual part, you need to create a blank css file (I named my login-theme.css) and upload it to /wp-content/themes

Now let’s get started:

Go to Appearance > Editor > Add the following code in functions.php:

function custom_login_css() {
echo ‘<link rel=”stylesheet” type=”text/css” href=”‘.get_stylesheet_directory_uri().’/wp-content/themes/login-theme.css”>’;
}
add_action(‘login_head’, ‘custom_login_css’);

Change background for Login page

To do so, please add this code into your css file you created above.

.login{
background: #ccc !important;
}

Make sure to change the background color to your liking or you can just take the one above. It’s up to you.

Change the Logo image

Again, same file, add this

.login h1 a {
background-image: url(‘Add the url of your logo here’);
background-size: 330px 122px;
width: 330px;
height: 122px;
}

Do not forget to replace the url image above with your logo or you can make one and upload it to the same directory as your CSS file.

Automatically give a check for WordPress “Remember Me”

By default, the Remember Me box will not be checked. If you want the system to log you in immediately without entering the username and password, please use this code.

function login_checked_remember_me() {
add_filter( ‘login_footer’, ‘rememberme_checked’ );
}
add_action( ‘init’, ‘login_checked_remember_me’ );

function rememberme_checked() {
echo “<script>document.getElementById(‘rememberme’).checked = true;</script>”;
}

Game over! I hope you learned a few CSS coding knowledge and improve your creativity through out this entire post. I know it’s not that long, I tried to write as simple as possible for you guys, the beginners.

Share this: