When creating and editing your site’s Membership Levels, you can choose to add membership requirements at the post category level. By doing this, any post in that category will automatically have the access restrictions in place.

This recipe demonstrates how to remove that access restriction on specific post IDs, regardless of the category’s settings.Banner image for How to Allow Visitor Access to Specific Posts in a Membership-Restricted Category

The Code Recipe


Note: Customize this code recipe to update the public_post_IDs array with your specific post IDs to unlock. For help with this reach out to our Support Engineers on our Member Support Area.

Adding the recipe to your website

Copy and paste this code recipe into a helper PMPro Customizations plugin.

Free Course: Membership Site Development—The Basics

Develop a deeper understanding of membership site development in this beginner-level course. Learn how to make your site work better, save yourself time and money, and improve your site's performance.

Featured Image for Membership Site Development Course: The Basics
Was this article helpful?
YesNo