• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer

Nile Flores Media

Helping You Rock Out Your Website Like A Rockstar

  • Home
  • About
  • Blog
  • Portfolio
  • Hire Me
  • Resources
  • Contact
  • Blogging
  • WordPress
  • Social Media
  • SEO
  • Web Design
  • News
  • Podcast
You are here: Home ยป WordPress ยป Brand Your WordPress Login Page Without A Plugin

Brand Your WordPress Login Page Without A Plugin

By Nile Flores 13 Comments


There is a Custom Admin Branding plugin for that, but why bother when you can insert a few lines into your theme’s functions.php file? ๐Ÿ˜‰

However, if you like to change up your site’s theme sometimes, you probably want to change the log in page too. A lot of people have been really hooked into branding their WordPress log in page, especially since guest blogging has become popular.

Here is the code I put together for Blondish.net. This is all merely adding CSS and an action to your theme’s functions.php file. (Note: some people like to be tidy and can put this in another file and reference it to the functions.php file.)

Adding the action for your custom login:

add_action('login_head', 'my_custom_login_logo');

Replace the WordPress logo:

function my_custom_login_logo() {
echo '<style type="text/css">
.login h1 a { background-image:url('.get_bloginfo('template_directory').'/images/blondishnet-2011-bottom-logo.png) !important;height:80px;width:401px;margin-bottom:5px;no-repeat scroll center top transparent; }

Adding your own background to the login page:

html, body {background: url('.get_bloginfo('template_directory').'/images/blondishnet-bg.png) !important;}

Removing the Back to blog link:

#backtoblog { display:none; }
</style>';
}

Customizing the login box area:

#login {width:401px !important;}
.login form {background: url('.get_bloginfo('template_directory').'/images/blondishnet-bg2.png) !important;}
.login label {color: #fff; font-size: 16px;}
input.button-primary:active, button.button-primary:active, a.button-primary:active {
background-color: #EEA2BB !important; background-image: none !important; color: #BA314C !important; border-color: #BA314C !important;}
input.button-primary, button.button-primary, a.button-primary {background-color: #EEA2BB !important; background-image: none !important; color: #BA314C !important; border-color: #FAD5E1 !important;}
.login #nav a, .login #backtoblog a {color: #BA314C !important;}
.login #nav a:hover, .login #backtoblog a:hover {color: #000 !important;}
</style>

Replacing the WordPress.org link that is on the login page (where you put your site’s name or logo):

<script type="text/javascript">
function loginalt() {
var changeLink = document.getElementById(\'login\').innerHTML;
changeLink = changeLink.replace("http://wordpress.org/", "' . site_url() . '");
changeLink = changeLink.replace("Powered by WordPress", "' . get_bloginfo('name') . '");
document.getElementById(\'login\').innerHTML = changeLink;
}
window.onload=loginalt;
</script>

Now, the full code in action:

add_action('login_head', 'my_custom_login_logo');
function my_custom_login_logo() {
echo '<style type="text/css">
.login h1 a { background-image:url('.get_bloginfo('template_directory').'/images/blondishnet-2011-bottom-logo.png) !important;height:80px;width:401px;margin-bottom:5px;no-repeat scroll center top transparent; }
html, body {background: url('.get_bloginfo('template_directory').'/images/blondishnet-bg.png) !important;}
#login {width:401px !important;}
.login form {background: url('.get_bloginfo('template_directory').'/images/blondishnet-bg2.png) !important;}
.login label {color: #fff; font-size: 16px;}
input.button-primary:active, button.button-primary:active, a.button-primary:active {
background-color: #EEA2BB !important; background-image: none !important; color: #BA314C !important; border-color: #BA314C !important;}
input.button-primary, button.button-primary, a.button-primary {background-color: #EEA2BB !important; background-image: none !important; color: #BA314C !important; border-color: #FAD5E1 !important;}
.login #nav a, .login #backtoblog a {color: #BA314C !important;}
.login #nav a:hover, .login #backtoblog a:hover {color: #000 !important;}
</style>
<script type="text/javascript">
function loginalt() {
var changeLink = document.getElementById(\'login\').innerHTML;
changeLink = changeLink.replace("http://wordpress.org/", "' . site_url() . '");
changeLink = changeLink.replace("Powered by WordPress", "' . get_bloginfo('name') . '");
document.getElementById(\'login\').innerHTML = changeLink;
}
window.onload=loginalt;
</script>
';
}

You can customize more of the page too, so just view the source of your login page (or you can click “Inspect Element” in Chrome or Firefox to get view the element you need to change) and you can put other CSS attributes into the code above.


Filed Under: WordPress Tagged With: wordpress, wordpress custom login page, wordpress tricks, wordpress white labeling

About Nile Flores

Nile is a 43-year old female from the greater St. Louis (Southern Illinois side) area. Nile is a mother of 1 son. She is also a web designer and developer, a graphic designer, and a public speaker, who exclusively designs and develops using WordPress. She also blogs at GoDaddy's Blog, Verpex Hosting's blog and her very personal sites, Pixelled and Nail Polish Happy.




Related posts:

Edit The Number Of Words For The Excerpt in WordPress Add More Social Network Handles To Your WordPress Author Profile Inserting Adsense Between Posts in WordPress Applying Author Gravatar In Post Comments How to Display A User Welcome Message In WordPress

Reader Interactions

Comments

  1. larry bobbert says

    January 17, 2012 at 4:50 pm

    Saw your presentation on WordPress.tv and was impressed with your knowledge so came here to check you out.
    Thanks

    Reply
  2. Kostas says

    January 19, 2012 at 3:59 pm

    I was looking for something like this for a long time, I have a multi-author blog and I would certainly prefer it if my guest authors see a custom login page, it looks much more professional.

    I only have one question, since I use Thesis theme can I use the same code at the functions.php editor or I should use a different code?

    Thanks
    Kostas

    Reply
    • Nile says

      January 21, 2012 at 5:31 am

      You will have to add a hook and then that code in Thesis or in Genesis.

      Reply
  3. dev says

    January 20, 2012 at 2:30 pm

    Hey that is really some serious customizing Great article thanks.

    Reply
  4. barrymackey says

    January 20, 2012 at 5:12 pm

    thanks for the easy to understand information,just learning html

    Reply
  5. Kimberly Castleberry says

    January 20, 2012 at 10:23 pm

    That’s pretty cool. Of course the standard policy applies that that stuff really should be done in a child theme (or custom functions/css file) so the code alterations aren’t lost when the theme is upgraded… but still far more efficient than a plugin. I like this!
    Kim

    Reply
    • Nile says

      January 21, 2012 at 5:30 am

      If you have a major framework, yes. However, if you are a developer that does from scratch, copy and paste the code over to the new theme’s functions.php. AND in the case they do develop that theme from scratch into a framework for all future work… definitely agree with you.

      Reply
  6. Igor Kopmar says

    January 26, 2012 at 7:27 am

    Well I think that this code will give a nice response to my wordpress page,
    I wil try this

    Reply
  7. Linda Campbell says

    February 20, 2012 at 9:53 am

    Excellent tips but I personally don’t allow other people to login into my blog so this wouldn’t be something I want to dig in and modify ๐Ÿ™‚

    Reply
  8. Arjun Rai says

    March 9, 2012 at 5:27 am

    Amazing information, These codes are very useful for those who know little about development and designs ever non developers can also use this code.

    Reply
  9. Gautham says

    July 30, 2013 at 12:30 pm

    I always though the login page was static and uncustomizable, Thanks for this awesome technique to customize it without any plugin.

    Reply

Trackbacks

  1. WordPress Plugin Review: Theme My Login says:
    January 17, 2012 at 3:08 pm

    […] I found a nifty WordPress plugin and this one themes your login page to conform with your current layout. It is called Theme My Login and it was created by Jeff Farthing. Now, this is different from the tutorial on theming your WordPress login page. […]

    Reply
  2. How to Brand Your WordPress Login Screen says:
    March 23, 2012 at 3:03 am

    […] order to do so, you can either change the code of your functions php file as instructed in this post or you can simply use a […]

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

Follow Me On:

  • Facebook
  • Instagram
  • LinkedIn
  • Twitter
  • YouTube

Get The Latest WordPress & Blogging Tips

Sign up for my newsletter, and also get my free ebook on 10 Reasons Why Your Website Isn't Converting, and How to Fix it!




Try to be More Positive on Social Media

Note: You can click on image and view the video in a larger lightbox window.

Footer

The Blog

Lots of free information, tutorials, and more to help you bring your best foot forward with your website.

  • Blogging
  • WordPress
  • Social Media
  • SEO
  • Web Design

Get The Latest WordPress & Blogging Tips

Sign up for my newsletter, and also get my free ebook on 10 Reasons Why Your Website Isn't Converting, and How to Fix it!

Copyright © 2025 · · WordPress