I'd like to customize the log-in page for my WordPress theme and although I can play around with the CSS, I would love to re-position the "Lost your password?" and "← Back to Site" links to be inside of the foreground box, rather than below it / or, in other words...so these links are placed inside of the form-field.

How would I be able to achieve this so that I am not modifying any files outside of the Themes directory or would I need to re-create the entire log-in page and link to the new one for this?

Thank you.

2 Answers 2


although I can play around with the CSS

If you are not going to use CSS (or jQuery) to modify the position of these elements, you have to create your own login form: Customizing_the_Login_Form#Make_a_Custom_Login_Page.

There is no hook in wp-login.php that allows to move these elements inside the form field.

Related: Where to put my code: plugin or functions.php?

  • No worries, thank you for this brasofilo. Is there any function/script that I can use to re-direct all the built-in hyperlinks that would normally take the user to .../wp-login.php? to the new, custom log-in page? Jan 15, 2013 at 21:59
  • 1
    Well, it's funny why can't you move this things with CSS or jQuery (oh, I see now the comment in the other A)... See if you can adapt this: Easy Login URL with No Htaccess ;)
    – brasofilo
    Jan 15, 2013 at 22:11
  • Thanks for the quick find on re-directing those native hyperlinks brasofilo, great work as always. +1 Jan 15, 2013 at 22:16

Change the height of the box: .login form to whatever suits you, and then position: relative; with negative top value on the links.


.login form{
     height: 220px;
.login p{
     position: relative;
     top: -80px;
    top: -70px;
  • Yes, this was my first attempt but when you click on Lost your password?, you get a large amount of empty space between the Get New Password button and the two links below it. Jan 15, 2013 at 21:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.