Project

General

Profile

Support #11208

Password Protected Page Not Working when page set to page_for_posts

Added by Laurie Hurson 2 months ago. Updated about 2 months ago.

Status:
Resolved
Priority name:
Normal
Assignee:
Category name:
-
Target version:
Start date:
2019-03-11
Due date:
% Done:

0%

Estimated time:

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

History

#1 Updated by Boone Gorges 2 months 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)

#2 Updated by Laurie Hurson 2 months 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?

#3 Updated by scott voth 2 months 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.)

#4 Updated by Boone Gorges 2 months ago

I like Scott's idea - this seems like maybe the best and easiest way to hide a category archive.

#5 Updated by Laurie Hurson 2 months ago

Thanks for this suggestion, Scott. I will try it out and report back.

#6 Updated by Boone Gorges about 2 months ago

  • Target version set to Not tracked

#7 Updated by scott voth about 2 months ago

  • Status changed from Assigned to Resolved

Also available in: Atom PDF