WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have set a page to be password protected in the admin, but for some reason WP is not asking for the password when viewing the page.

It definitely isn't a plugin as I have confirmed the behaviour with the plugin folder renamed. I have been testing it in Chrome w/incognito.

The page is using a custom template, which may be the problem? No other templates I have looked at though seem to display any password logic.

share|improve this question
Maybe you already have the password stored within cookies? – onetrickpony Aug 5 '11 at 13:28
Either you entered the password once before and forgot, or your custom template isn't set up to handle password protected content. It will be easier to diagnose if we could see the code to your custom template. Please post it here. – EAMann Aug 5 '11 at 13:31
The template is assisting a very complex plugin, the content of the post isn't actually loaded as it doesn't contain the loop. In incognito mode there are no cookies passed. – Dunhamzzz Aug 5 '11 at 13:44
@EAMann is the pasword logic required in the template? Or is it activated in the loop as that would explain it – Dunhamzzz Aug 5 '11 at 13:59
@EAMann, you don't have to add any checks in custom template for this. WP will do this automatically. – Steven Aug 5 '11 at 15:52
up vote 2 down vote accepted

The answer to this question was simply that the built-in password protection does not apply if you are using a custom template that doesn't include the_loop(). Lesson learnt.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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