Support #11208
closedPassword Protected Page Not Working when page set to page_for_posts
0%
Description
Hi all,
A professor wants to have a public site with a password protected blog so student writing is only visible to users in the class. The password-protect function works on a static page, but when set as the "posts" page in settings>reading the password function no longer works on the page.
Tested here on "blog" page: https://ell101spring19.commons.gc.cuny.edu/blog/
Pw: spring2019
Updated by Boone Gorges over 5 years ago
- Tracker changed from Bug to Support
- Subject changed from Password Protected Page Not Working to Password Protected Page Not Working when page set to page_for_posts
- Status changed from New to Assigned
- Assignee set to scott voth
I'm afraid this is just a limitation in the way that page passwords work. It's only meant to protect the content of pages. When you set the page as the "Posts page" at /wp-admin/options-reading.php, you're no longer displaying the page content at all - you're just hijacking the URL of the page.
I'm assigning this ticket to Scott in case he's aware of a way to password-protected the post archive. My guess is that there is not, and the only option is to make the entire site non-public (Site Visibility at /wp-admin/options-reading.php)
Updated by Laurie Hurson over 5 years ago
Thanks for this explanation Boone.
Would a possible workaround be to PW protect a category archive (maybe with this plugin https://wordpress.org/plugins/access-category-password/) and then set that category as default in settings?
Updated by scott voth over 5 years ago
Hi Laurie - That plugin looks good, but I think you can also create a password protected page and then use a shortcode ("[su_posts]" using the "Shortcodes Ultimate" plugin that displays all the posts.
Or you could do the same with Gutenberg and add a widget (but I think right now you can only use 3 widgets and the "recent posts" widget is pretty limited - just shows title and date of post.)
Updated by Boone Gorges over 5 years ago
I like Scott's idea - this seems like maybe the best and easiest way to hide a category archive.
Updated by Laurie Hurson over 5 years ago
Thanks for this suggestion, Scott. I will try it out and report back.