Global Content Restriction Add-on is the tool that you need for managing what type of content is available for each Subscription Plan. After setting it up you don’t have to worry about adding restrictions individually for each Page, Post or Custom Post Type.
Install the Global Content Restriction Add-on
Global Content Restriction is a Basic add-on, available with a Paid Member Subscriptions Hobbyist or Pro license only.
After purchasing the add-on, the .zip file will be available for download under your account page by clicking the “Add-ons Download” button.
Once downloaded, you can install the add-on as a normal WordPress plugin, by uploading the .zip file in your WordPress Admin -> Plugins -> Add New -> Upload Plugin.
Alternatively, you can install the Global Content Restriction add-on by extracting the folder found inside the archive and uploading the entire folder via FTP to your /wp-content/plugins folder found inside your WordPress install.
- Paid Member Subscriptions – version 1.5.0 or higher
Global Content Restriction Settings
After setting up the details for our Subscription Plan scroll down to the Global Content Restriction Meta Box. Click on the Add Rule button to enable a restriction.
Restricting a Post Type
Select a Post Type from the ones available. Here you will see post, page, attachment and all the other Custom Post Types.
In our example we selected “post” and right now only members subscribed to this plan will be able to see the posts. Logged out users and logged in users not subscribed to this plan will see, instead of the content, an appropriate message.
Restriction based on Taxonomy
You’ll notice that you can now choose to add a Taxonomy restriction for the selected post type. Click on the “Add Taxonomy” button and select one from the taxonomies attached to the previously selected post type.
In our case we selected the “Category” Taxonomy.
All the available terms from the Category Taxonomy will now be displayed as checkboxes.
By selecting the “Premium content” term will now allow only users subscribed to this plan to see the posts from this category. Everyone else will be able to see only the posts from the Uncategorized category and all the content from all other post types.
This is how a restricted post looks like in Front End for a logged in non-member that didn’t subscribe to the Subscription Plan. You can adjust the message for logged-in non-member inside Paid Member Subscriptions -> Settings -> Content Restriction.
Multiple Restriction Rules
Now you can choose to Restrict Content based on Terms under another Taxonomy, of the current Post Type, or you can add a different rule where you can select a different Post Type.
In this example I selected another Taxonomy for my Post Restriction, called Special which has an Advance Course term, and also I have created another rule where I restricted access to members not subscribed to this plan, for the Custom Post Type “book”, having the term “Advanced Math”, of the Custom Taxonomy “Math”.
To sum up, we now have a “Gold” Subscription Plan that allows access to the posts from the “Premium content” Category, from the Special Taxonomy, that has the “Advanced Course” term, and also from to Book Post Type having the “Math” Taxonomy that uses the “Advanced Math” term.
Users that didn’t subscribe to the “Gold” plan will not have access to the content mentioned above. You can have a different set of rules for each of the Subscription Plans.
Restrict Individual Posts
Protecting content for different Membership Levels is an integral part of Paid Member Subscriptions. There are two ways of protecting individually your Posts, Pages or Custom Post Types:
- Directly inside each individual Post, Page or Custom Post Type using the Content Restriction Meta Box
- Using the [pms-restrict] shortcode
To remove the content restriction for certain Terms, simply uncheck the checkboxes for those specific Terms.
In order to remove the whole Taxonomy based restriction, therefore restricting all posts regardless of category, click the Remove button associated to each Taxonomy.
Removing completely a Restriction Rule can be done by clicking on the “X” displayed in the right side of each rule.