How do I password protect a page of posts on Wordpress?

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!

Answers 2

  • 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.

  • 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

Related Questions