0

I have several pages on my site, and I want to password protect a page which displays the latest posts. Simply going to the admin panel and setting "Visibility: Password protected" isn't doing anything so... Any help?

I am using Wordpress 4.3.1 on a local machine, if that's any use.

Thanks in advance!

8
  • What exactly do you mean with "setting "Visibility: Password protected" isn't doing anything"? It is a built-in feature in WordPress that works for everyone else. Can you explain in more detail?
    – cybmeta
    Commented Oct 19, 2015 at 9:11
  • Sorry for the vagueness... I mean the page still shows all its contents without asking for a password. It's as if I had set "Public" on the admin panel for the page.
    – malakhim
    Commented Oct 19, 2015 at 9:14
  • In that case, it must be something broken in your WP installation. You should try to fix it instead of asking how to password protect a page because that feature already exists in WP. Deactivate all plugins and switch to a default theme. Check if password protect works correctly and then activate the plugins one by one and switch to your theme; this way you can isolate the plugin/theme where the problem come from.
    – cybmeta
    Commented Oct 19, 2015 at 9:35
  • I've disabled all plugins, switched to default twentyfifteen theme and that still happens.
    – malakhim
    Commented Oct 19, 2015 at 9:59
  • The only things I've changed in the default WP install is that I've added a CSS and JS file to the header to add my own changes, but that's it. Definitely no PHP.
    – malakhim
    Commented Oct 19, 2015 at 10:02

2 Answers 2

0

When you create a page and assign it to "Page for post" in Settings->Reading, it is not considered a page anymore but an archive. Taht is why standard password protection doesn't work. You will need to build the latest posts page at your own, for example using a page template and/or pre_get_posts action.

0

Password-protection is an in-built feature of WordPress, in case you didn't know. When creating a page, you simply click “Edit” next to Visibility in the Publish box on the right. Choose “Password protected” and set the password as you choose.

Below is screenshot for It. It is also available on page too. screenshot taken of post.

enter image description here

2
  • I did that, and when I checked the page (using either Preview Changes or navigating straight to the page) it still shows all the page contents.
    – malakhim
    Commented Oct 19, 2015 at 9:15
  • try logging out and accessing the page again
    – julia
    Commented Oct 20, 2015 at 9:29

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.