If you’ve set the option “Filter Searches and Archives” to “Yes” under the Memberships > Advanced Settings page, all of the posts in your members-only categories will be hidden from the main page, archives, and search queries. This code gist allows you to add specified categories back into the query.


Why would I want to do this?

This is useful for sites that want to totally exclude posts from certain categories from being seen by a visitor or indexed by search engines, while keeping posts in other restricted categories discoverable.

Note that the posts in these categories will still be locked to members-only, they’ll just appear in the appropriate places as teaser content for your membership offering.


The Code Recipe

This code recipe requires a PMPro Plus Account or higher.

View Membership Options


Leave a Reply

Your email address will not be published. Required fields are marked *