Make WordPress Core

Opened 8 years ago

Closed 7 years ago

Last modified 6 years ago

#43924 closed feature request (maybelater)

Add ability to add page for "Logged In User"

Reported by: khoipro Owned by:
Priority: normal Milestone:
Component: Posts, Post Types Version:
Severity: normal Keywords:
Cc: Focuses:

Description

Refer: ​https://codex.wordpress.org/Content_Visibility

It's too hard to keep exclude logged in pages from a main query like Search. All we can do is hard code a page name, and if we have many pages which required logged in to see, to keep them hidden from search results it must do it manually.

My suggestion:

  1. Add a visibility status for "Logged-in User".
  2. Keep to exclude their pages from default public search, and visible them only for logged users.

Another topic about this issue:

​https://wordpress.stackexchange.com/questions/142811/exclude-pages-from-wordpress-search-result-page
​https://wordpress.stackexchange.com/questions/34439/exclude-post-from-home-page-and-archives-but-still-public
​https://www.johnparris.com/exclude-certain-pages-from-wordpress-search-results/
​http://www.beginwp.com/exclude-certain-post-pages-from-wordpress-search-result/

Change History (7)

#1 @SergeyBiryukov
8 years ago

  • Component Post Formats → Posts, Post Types

This ticket was mentioned in ​Slack in #design by karmatosed. ​View the logs.


8 years ago

This ticket was mentioned in ​Slack in #design by karmatosed. ​View the logs.


7 years ago

#4 @nrqsnchz
7 years ago

  • Keywords ui-feedback removed

We discussed this ticket today during the Design team triage meeting (​https://wordpress.slack.com/archives/C02S78ZAL/p1584989720143300). We agreed to remove the "ui-feedback" keyword since this ticket does not feel like it needs design or design feedback.

Please feel free to add it again and provide more info if you think otherwise.

#5 @khoipro
7 years ago

  • Resolution → maybelater
  • Status new → closed

#6 @desrosj
6 years ago

  • Milestone Awaiting Review
  • Version 4.9.5

Hi @khoipro, I am assuming that you were able to find a different solution for this. If I understand your request correctly, you are looking for a way to limit the ability to view certain pages to only logged in users. I think there are several plugins out there that accomplish this very well, and I'm not sure there is a current need for this in Core.

Leaving the maybelater resolution so this can be reopened if that changes!

#7 @khoipro
6 years ago

Hi,

Sorry for late response. Actually there is no plugin support for a simple query such like that.

So recently I must to check is_user_logged_in() everywhere to get post for logged-in user or guest.

Should we improve it @desrosj?

Note: See TracTickets for help on using tickets.