A Cozmoslabs Product
Documentation / Content Restriction

Content Restriction

Restricting content based on membership level is an integral part of Paid Member Subscriptions.

There are two ways of protecting your posts, pages, and custom post types: directly from each individual post or page or using the [pms-restrict] shortcode.

Restriction Types

Considering that PMS creates the user account even if the payment was not successful (we do this so that users can login and retry the payment), you should always restrict your paid content by checking the right Subscription Plans checkboxes and not rely only on the Logged in status of your users.

Using a Message

This option will show the user a custom message instead of the restricted content that he was trying to access.

If you check only Logged in Users in the Display For area the content will be visible to anyone who is logged in. To restrict the content based on a subscription plan as well, you will need to check the boxes corresponding to the Subscription Plan.

PMS_Content_Restriction

In the screenshot above the restriction is applied to show this post only to users who are subscribed to the Gold or Silver plan.

The message that the user will see if he cannot access the content can be found by going to Paid Member Subscriptions -> Settings -> Content Restriction.

If you check the Enable Custom Messages checkbox you will be able to modify these messages and make them specific to the post that you just restricted.

PMS_Content_Restriction_messages

Using a Redirect

This option will allow you to define a page that users should be redirected to if they don’t have access to the content they were trying to access.

Content Restriction _ Restriction using a redirect

Based on the settings shown in the screenshot above, only users who are subscribed to the Gold or Silver plan will be able to see this page, the rest will be redirected.

The Redirect URL can be changed by going to Paid Member Subscriptions -> Settings -> Content Restriction.

You can also add a Custom Redirect URL which is only applied to the post that is currently being edited by checking the Enable Custom Redirect URL checkbox. If you want logged-in users with no Subscription Plan or those whose Subscription Plan has expired to be redirected to a different URL when accessing the post, you can do so by specifying it in the Custom Non-Member Redirect URL field. If the field is empty, all users will be redirected to the same URL.

Content Restriction _ Customize_Redirect

Using a Template

By selecting this option if the post is restricted the default template of the post will be changed with the one selected in the “Restriction Template” section dropdown.

Settings Default

This option will take the content restriction settings configured in Paid Member Subscriptions -> Settings -> Content Restriction and apply them to the post. This is also the default selected option.

Content Restriction _ Settings_Default
Restricting the content using the Settings Default option.

Restrict Content Shortcode

https://www.cozmoslabs.com/docs/paid-member-subscriptions/shortcodes/#Restrict_Content

Restriction Using a Template

By selecting this option if the post is restricted the default template of the post will be changed with the one selected in the “Restriction Template” section dropdown.

paid member subscriptions restriction templat and misc settings

Misc

Restrict Comments

Paid Member Subscriptions gives you the option to restrict comments. You can restrict the user from viewing and replying to comments or you can let the user view comments but deny him replying.

To activate this functionality, you need to go to the Paid Member Subscriptions -> Settings -> Content Restriction page.

Restricted Posts Preview

This option works only for the Message type of restriction. Instead of hiding all the content, it gives you the ability to show a part of it to your users.

You can either use the option to Show the first X words of the post’s content or you can choose to Show the content before the “more” tag.

The content will be truncated at the number of words that you specified or just before the more tag, depending on the option selected. After the truncated content, the content restriction message will be shown as well.

Exclude Restricted Posts from Queries

When enabled, this setting hides restricted posts, products, or forums from appearing in public queries, such as WordPress archive and search pages, WooCommerce shop or product categories, and bbPress forums.

Restrict Content Globally

If you’re using a paid version of Paid Member Subscriptions you have access to the Global Content Restriction add-on. This is the best way to restrict your content as you can target custom post types and taxonomies directly.
You can simply create a category `Premium Content` in which you add the posts you want to be restricted, target this category with our add-on, and never worry about applying the restrictions to each post one by one.

You can read more information by going to the documentation page for it.

Restrict Files

The File Restriction Add-On allows you to restrict access to files in the WordPress Media Library based on subscription plans and login status. This ensures that sensitive files are only accessible to authorized users.

The File Restriction add-on is available with a Pro or Agency license for Paid Member Subscriptions.

You can read more about this add-on on the following documentation page.

Restrict WooCommerce Products

https://www.cozmoslabs.com/docs/paid-member-subscriptions/integration-with-other-plugins/woocommerce/#Restrict_Product_Viewing

Restrict bbPress forums

Paid Member Subscriptions is also capable of restricting bbPress forums. For this functionality to work, you need to have installed the bbPress add-on.
The bbPress add-on is available with a Basic or Pro license for Paid Member Subscriptions.

More info about this functionality can be read here.

Restrict Elementor Widgets and Sections

https://www.cozmoslabs.com/docs/paid-member-subscriptions/integration-with-other-plugins/elementor/

Restrict Gutenberg Blocks

This functionality is described in this section of the Documentation.

Restrict Divi Modules

This functionality is described in this section of the Documentation.

Paid Member Subscriptions Pro

Accept (recurring) payments, create subscription plans and restrict content on your website. Easily setup a WordPress membership site using Paid Member Subscriptions.

Get Paid Member Subscriptions

The Ultimate Membership Bundle

Combine the power of Profile Builder with Paid Member Subscriptions to set up user registration, memberships, and recurring revenue.

Get 25% off with the bundle

Help & Support

We’re here to help you every step of the way.

Open a Support Ticket