-
Notifications
You must be signed in to change notification settings - Fork 313
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update: Exclude password protected posts from search #1913
Conversation
@tlovett1 Excluding password-protected posts is not the default behavior of WordPress core but it makes sense to me. Should we respect core behavior here? Given that we can change it by using the new filter introduced in this PR. |
Is there any blocker in review & merging this PR? |
@dinhtungdu thank you so much for submitting MR. We'll surely take a look & bring under consideration while tech discussion would be continued. |
Hi all, Any timeline or update on the status of this? |
Did some extensive testing on the current state of the PR and I found the below scenarios occurring: Scenario 1
At step 4, it actually shows the post. The only way to fix this is by running Scenario 2Continuing from scenario 1, after running
At step 4, it still shows the passworded post as well. Scenario 3
At step 3, you do not see the password protected posts listed. |
closing in favor of #2408 |
Description of the Change
This PR is a replacement for #1789. Instead of adding a new meta, we use
has_password
argument ofWP_Query
to control the visibility of protected posts.By default, EP doesn't index password-protected posts. They will be indexed if Protected content feature is enabled. Again, only admin queries return protected posts; this PR introduces a new filter to enabled it on the frontend:
ep_exclude_password_protected_from_search
.Alternate Designs
See #1789.
Benefits
Hide password-protected posts from search results.
Possible Drawbacks
None that I'm aware of.
Verification Process
Reindex site contains password protected posts with Protected Content enabled. See protected posts in the admin area but not on the frontend.
Checklist:
Applicable Issues
Closes #1789
Changelog Entry