WordPress Restricted Site Access (SAR) - Plugin Settings


Plugin Settings Overview

Back to User Guide

The WordPress Restricted Site Access plugin allows users to create a membership and content restriction solution. The content restriction is based on user WordPress roles and whether or not they are logged in.

Setting up Access Restriction Pages

The first thing to set up after installation are the pages that users will be redirected to when trying to access restricted content. There are two types of access restriction. First, when the user is not logged in. Second, when the user is logged in but trying to access a page which is restricted for their role.

1) Accessing the Settings

Go to Admin Dashboard → CM Site Access Restriction Pro â†’ Settings to open the settings page.

Navigation to the plugin settings - Content Control WordPress
Navigation to the plugin settings

2) Go to the General Tab

General settings tab - Page Restriction WordPress
General settings tab

There are a few sections with options.

General

General options - WordPress Restrict Content
General options
  • Restriction type - Choose how much of the content is restricted:
    • Restrict full content - Restrict all content on the page.
    • Restrict partially content - Showing some percentage of the content with a fade effect and message (configurable in the labels section). The percentage is defined lower in the option Restrict partially content percentage.

Example

Example of partial restriction - Content Gate
Example of partial restriction
    • Restrict content with shortcode only - Show all content except those parts that are restricted by the [access] shortcode. Learn more about this shortcodeNote: this feature was introduced in version 1.5.5.

Example

Let's restrict two different parts of the content with a shortcode that displays the message for non logged-in users: [access login="1" deniedtext="This content is restricted"]

Restricting specific parts of the content - Content Dripping WordPress Plugin
Restricting specific parts of the content
  • Restrict partially content percentage - Set the percentage of how much content should be displayed when the option Restrict partially content is enabled. Default value is 20%. Note: this option was introduced in version 1.6.0.
  • Maintain content format - This setting can be used with restrict partially content only.
  • Access Denied page URL - It is the general URL which will be shown for logged-in users if they try to access content restricted for their WP role. 
  • Login page URL - It is the URL of the page which non logged in users will be redirected to when trying to access a page which has access restriction.

Note

The parameter ?cmreg_redirect_url= will work only with WordPress Registration Form Plugin (as shown below). To use the default WP login, apply ?redirect_to=

  • Access denied due to time restriction - You can select the page where the user will be redirected after they try to visit a restricted page outside of an approved time. Approved time is defined on the next tab of the Settings - Post Types, in the field Access denied X days from registration.

Extra

Extra options - Tiered Membership
Extra options
  • Enable restriction with custom filter - Enable this option if you want to restrict access with custom filter called cmsar_single_content in your theme.

    Example: apply_filters('cmsar_single_content', $content);

    Note: this option was introduced in version 1.5.6.

  • Exclude homepage displays with your latest posts - If you use the latest posts as the homepage, you can make the homepage an exception. Learn more: How To - Exclude Homepage When It Shows Latest Blog Posts
  • Display restriction label on archive page - Archive pages are those that list items, such as your blog posts. To identify restricted posts, select Yes. You can translate the message from the labels settings.

Front-End Example

Example of the restriction message - Content Control WordPress
Example of the restriction message

Admin Bar & dashboard

Admin bar and dashboard options - Page Restriction WordPress
Admin bar and dashboard options
  • Hide admin bar - If enabled, the admin toolbar will be hidden for all users on the front-end. Note: this option was introduced in version 1.6.5.
  • Allow admin bar for specific roles - Choose user roles which are allowed to see the admin toolbar, in case if you enabled the option Hide admin barNote: this option was introduced in version 1.6.5.
  • Restrict dashboard access - You can restrict the dashboard access to certain roles (except admin). Note: This option was introduced in version 1.3.3.

3) Go to the Post Types tab

Next is the Post types tab.

Post types settings tab - WordPress Restrict Content
Post types settings tab

In this section you can restrict all posts which belong to a custom post type, as well as restrict access to the general pages and posts. 

Here are the items you can restrict:

  • Posts
  • Pages
  • Media
  • Projects etc.

The available options for each item are:

Available restriction options - Content Gate
Available restriction options
  • Access not restricted - Access is allowed to all roles including non authorized users.
  • Access restricted to logged-in users - This means that all roles are authorized.
    • Access denied X days from user first access - Set the number of days of access expiration. After passing this amount of days the user loses his access to the content after first accessing it. Note: This option was introduced in version 1.5.8.
  • Allow only anonymous access - Only non-authorized users are allowed to view the content. Note: This option was introduced in version 1.4.10.
  • Access restricted by role - Once selected you can specify which roles can access content.
  • Access restricted by whitelist - Only users from the whitelist are allowed to view the content. Note: This option was introduced in version 1.4.10.
  • Access restricted by blacklist - Access is restricted only for users from the blacklist. Note: This option was introduced in version 1.4.10.

Access restricted by Whitelist/Blacklist

Since the version 1.4.11 you can add users to whitelist or blacklist by searching them in the special field and then just checking their boxes.

Example of restricting by whitelist - Content Dripping WordPress Plugin
Example of restricting by whitelist
  • Access restricted by specific date/time - Access is allowed only within defined period of time. You need to set start and end dates in the fields From and To. Note: This option was introduced in version 1.5.8.
  • Access restricted by joining date - Newly registered users will only be able to see content created on or after the registration date. Note: This option was introduced in version 1.7.2.
  • Access restricted by role and days passed since post creation date - Per each user role you can define the amount of days that should pass after the post is created in order to let the user access its content. Not selected user roles will not be able to access the content. If you don't want to restrict access for specific user roles by the post creation date, you need to select this role and set the value "0". If this option is chosen, then non-logged in users can not access the content of that type. Also, if you don't redirect users to the specific "access denied" page, you can show them a message with the date when they can access the content. You can customize the message: Learn more. Note: This option was introduced in version 1.8.0.

Example

Example of the settings - WordPress Restricted Site Access
Example of the settings
  • Access denied X days from registration - Access is restricted for users that registered less than X days ago.
  • Restriction type - This option overrides global settings. Choose the view of the message that the user will see when he tries to get access to restricted page:
    • Global settings - This is a default value. You can change it in the General tab of Settings.
    • Restrict full content - Works the same as in global settings.
    • Restrict partially content - Works the same as in global settings.
    • Restrict content with shortcode only - Works the same as an option in global plugin settings. Note: This feature was introduced in version 1.5.5.

Note On Media Files

In the case of media files, the plugin will restrict access to the media's Permalink, but not to the File URL.

The File URL usually follows the structure https://www.yoursite.com/wp-content/uploads/file

The image below has both Permalink and File URL highlighted:

Examples of the image permalink and file URL - Tiered Membership
Examples of the image permalink and file URL

Learn more about it: WordPress Restricted Site Access (SAR) - Restricting File Permalink vs URL


More information about the WordPress Restricted Site Access plugin

Other WordPress products can be found at CreativeMinds WordPress Store

Let us know how we can Improve this Product Documentation Page

To open a Support Ticket visit our support center
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.