Is there a way to call theme header and footer on the default login/register page? I understand that we can easily make a custom login page still asking.


  • It is not possible not call header and footer in wp-login.php, but you can customize it if you want (adding your logo, custom CSS and scripts, etc). What do you want to do exactly? – cybmeta Mar 28 '15 at 9:21
  • hmm.. I understood that. Actually I did not want to create custom login page, custom reset password page. Instead I wanted to just call header and footer on the default login page and then it will look much and being a part of the site. Now I think this is the only option left. – kalyan Mar 28 '15 at 9:22
  • It is also possible to render login form within page template. There are some nice plugins for that. – Przemek Maczewski Mar 28 '15 at 10:31

Looking at wp-login.php there are two interesting functions called login_header() and login_footer(). The footer one has a login_footer action which runs before the body tag is closed, so if you're looking to add extra markup it can go there. The login_header() function doesn't have a convenient action to render more markup, so the simple answer to your question is no.

That said, even if they both ran convenient actions, it would likely all fall apart if you simply added your theme's get_header() and get_footer() templates, because both assume there is no other markup before and after they're called, which is not the case for wp-login.php. So for this to work, wp-login.php would need some rearchitecting to make it theme-aware with sane defaults.

  • Thanks to everyone. So, I better create custom templates for login and reset passwords. – kalyan Mar 30 '15 at 7:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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