Skip to content

Member Content: Gate Content in Archives - #1256

Open
n7studios wants to merge 2 commits into
member-content-restrict-feedsfrom
member-content-restrict-archives
Open

n7studios wants to merge 2 commits into
member-content-restrict-feedsfrom
member-content-restrict-archives

Conversation

@n7studios

Copy link
Copy Markdown
Contributor

Summary

Restricts Member Content in archives, such as the blog, categories and search results.

Previously restriction only ran on singular requests, so archives using the_content() output the full content of restricted Posts with no Read More tag.

  • Restricted Posts output the content preview (the excerpt) in archives, without the call to action.
  • Posts with a Read More tag are unchanged, as WordPress already only outputs the teaser and Read More link in archives.
  • Renamed maybe_restrict_feed_content() to maybe_restrict_content_preview(), as it's now used for feeds and archives.

Subscribers with access to the Post still see the full content.

Testing

RestrictContentArchiveTest: restricted Post with teaser, restricted Post with excerpt, unrestricted Post unchanged.

Checklist

@n7studios n7studios added this to the 3.4.8 milestone Oct 23, 2026
@n7studios n7studios self-assigned this Oct 23, 2026
@github-actions

Copy link
Copy Markdown

WordPress Playground

🚀 Your PR has been built and is ready for testing in WordPress Playground!

Click here to test your changes in WordPress Playground

@n7studios
n7studios marked this pull request as ready for review October 23, 2026 13:38
@n7studios
n7studios requested review from a team, ciccio-kit and noelherrick and removed request for a team October 23, 2026 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants