Global Content Restriction

Paid Member Subscriptions Pro - Global Content Restriction - Thumbnail

 
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.

Paid Member Subscriptions Pro - Account Page - Download Add-ons

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.

For the Global Content Restriction add-on to work as expected, you’ll also need to have the following plugin to be installed and activated on your site:

Global Content Restriction Settings

After you install and activate the Global Content Restriction add-on go to Paid Member Subscriptions -> Subscription Plans and add a new plan or edit an existing one. 

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.

Paid Member Subscriptions Pro - Global Content Restriction - Settings

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.

Paid Member Subscriptions Pro - Global Content Restriction - Meta Box

To create the Custom Post Types (Book) we used the Custom Post Type Creator module available in the WordPress Creation Kit plugin

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.

Paid Member Subscriptions Pro - Global Content Restriction - Post

This is how a restricted post looks like in Front End for a logged out user. You can adjust the message for logged-out users inside Paid Member Subscriptions -> Settings -> Content Restriction.

Paid Member Subscriptions Pro - Global Content Restriction - Frontend Restricted Post.

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.

Paid Member Subscriptions Pro - Global Content Restriction - Restrict Post based on Taxonomy

To create the Taxonomies for our Pages, Posts or Custom Post Types (Post -> Special) we used the Custom Taxonomy Creator module available in the WordPress Creation Kit plugin

All the available terms from the Category Taxonomy will now be displayed as checkboxes.

Paid Member Subscriptions Pro - Global Content Restriction - Restrict Post based on Taxonomy Term

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.

Paid Member Subscriptions Pro - Global Content Restriction - Frontend Restricted Post for logged-in non-member

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”.

Paid Member Subscriptions Pro - Global Content Restriction - Multiple Rules

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:

Removing Restrictions

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.