Membershipsgive you the ability to define access to posts, pages, and other content based on whether the user has been assigned a specific membership.
In WP-Members, “memberships” can fit a variety of applications based on your need. In general, you can think of it as a defining tag that you can use to assign a user access to content. If the user has a specific membership product they can access content set to require that membership product.
Defining Memberships
Memberships can be created and defined in the “Memberships” menu item. You’ll need to have memberships enabled on the plugin’s main Options tab for this menu item to display.
Creating a new membership is much like creating a post. Just click the “Add New” button at the top.
For a new membership, just enter a title. The slug will be created automatically from the title.
For additional documentation and detailed information on available properties, see Membership Properties.
For documentation on how to set up “levels,” see Membership Levels.
To edit a membership, click the title in the memberships table. Selecting a membership will bring you to the membership editor screen (see the screenshot for Add New Product – it is the same screen when editing).
Note that you cannot change the slug of a membership.
Assigning Memberships to Content
To set a post, page, or other content to require a membership to access, you can do this in the post editor. In the upper right were the WP-Members post restriction meta box is, you will see the option to “Limit access to:” followed by a selector for memberships. You can list a single membership or you can list multiple memberships. In the case of multiple assigned memberships, the user will need to have a current and valid membership for one of the assigned memberships.
Managing User Access
You can manually enable or disable a user’s membership access in the user’s profile. In the Product Access section, select to “Enable” or “Disable” the desired membership and update the profile.
To automate access and/or to integrate with registration or other plugins, there are two API functions for adding or removing memberships for a user:
WP-Members will automatically check to see if a user has access to content when that user tries to access. However, for custom applications and integrations, the following API function can be used to check if a user has access or not:
Selling Memberships
Memberships are flexible. They are defined as a Custom Post Type (CPT) so you can integrate and customize how to assign access to users.
You can easily sell memberships through WooCommerce using the new WP-Members Memberships for WooCommerce extension. This extension will allow you to link a WP-Members membership in a WooCommerce product. If a membership is linked to a WooCommerce product, when the user purchases that product, the user will have that membership assigned to them and will then be able to access content set to require that membership.