The code recipe below synchronizes membership access to a single post category when the member purchases an Addon Package. Note that this only allows for a one-time payment, not a recurring subscription.

This method is covered in our Multiple Membership Levels Per User: The Workarounds post.

Banner for Advanced Code Recipe Tutorial for Paid Memberships Pro

Adding the recipe to your website

You can add this recipe to your site by creating a custom plugin or using the Code Snippets plugin available for free in the WordPress repository. Read this companion article for step-by-step directions on either method.

Modify line 14 with the post ID of your Addon Package and line 25 with the corresponding category (accepts category name, term_id or slug – see: WordPress Codex documentation for has_category function.

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