Style Your WordPress Login

A few weeks ago, I read a neat little post over at WPCandy about tweaking the WordPress login page. That post gave me a lot of inspiration and ever since redesigning WDW, it was on my to-do list. Today, I finally got around to styling it up.

One thing I discovered is that there is no need to add any plugins or to modify any core WordPress files. Adding a plugin for a simple task seemed a bit of an overkill and modifying the core files is never a good idea, especially when you update your instance of WordPress you have to re-do all your login styles again.

So if you want to go plugin free and give your login screen a little character you might enjoy this post.

WDW Login Page
The Web Design Weekly Login Page

View the finished product – Login Page

If you want to apply the same blurred look, first take a screenshot of your site. This will become your new login background. Open that image up in Photoshop and apply a Lens Blur effect to the image. I just used the default setting, but you could go crazy.

Lens Blur

Save that file somewhere in your themes folder. Either the images folder or a dedicated folder for your sites login page files. I have gone with the second option.

Folder Structure

While you are in Photoshop it is probably a good idea to also get your logo sorted. Save it to the same place as you new background image.

Next, add the the code below to your functions.php file and tweak it to suit your own layout and file structure.

The code below add some styles to the login page. One thing to note is that you have to be quite specific with your CSS rules so they override the default WordPress styles. I have targeted the body class and that seemed to do the trick.

function custom_login_logo() {
  echo '<style type="text/css">
    body.login #login{padding-top:0;}
    body.login h1 a{
      background-image: url('.get_bloginfo('template_directory').'/assets/images/login/wdw-login-bg.png);
    body.login #nav{
      /* Your styles */
    body.login #backtoblog{
      /* Your styles */
add_action('login_head', 'custom_login_logo');

Now you should be rocking a cool login page with no extra plugins added and no core files edited.

Do you have a cool login page?

8 thoughts on “Style Your WordPress Login”

    • There sure is.

      I have not gone down that road, but by tweaking your .htaccess file with the snippet below should do the trick.

      RewriteRule ^login$ [NC,L]

      For more info check out this post – Simpler Login URL

  1. This works very well, but I am trying to figure out how to make the “login-logo” redirect back to the “home_url” instead of going to “” , It’s doing this in wp-login.php.

    What is the best way to do this in the functions.php?

    • Answering my own question.

      I placed the following in my functions.php file.

      function my_login_logo_url() {
          return get_bloginfo( 'url' );
      add_filter( 'login_headerurl', 'my_login_logo_url' );
      function my_login_logo_url_title() {
          return 'Your Site Name and Info';
      add_filter( 'login_headertitle', 'my_login_logo_url_title' );

Comments are closed.