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.

  • Maybe you already have the password stored within cookies? Aug 5, 2011 at 13:28
  • 1
    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, 2011 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, 2011 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, 2011 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, 2011 at 15:52

1 Answer 1


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.

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.