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 Panel → 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

In the General settings, you can specify both URLs.

Note

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

  • The access defined URL is the general one which will also show for logged in users if they try to access content restricted for their WP role. 
  • The second URL (Login page URL) 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.
Setting up the URLs - WordPress Restrict Content
Setting up the URLs

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.

Time restriction setting - Content Gate
Time restriction setting
Role Restriction

Also, you can restrict dashboard access to certain roles. This feature was introduced in version 1.3.3.

Restricting access to the dashboard - Content Dripping WordPress Plugin
Restricting access to the dashboard
How Much Content is Restricted

Choose how much of the content is restricted:

Choosing the global restriction type - Tiered Membership
Choosing the global restriction type
  • 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 - WordPress Restricted Site Access
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 Control WordPress
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.
Setting up the % of how much content to show with partial restriction - Page Restriction WordPress
Setting up the % of how much content to show with partial restriction
  • 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.

Enabling restriction with custom filter - WordPress Restrict Content
Enabling restriction with custom filter
  • Maintain content format - This setting can be used with restrict partially content only.
Enabling maintain content format - Content Gate
Enabling maintain content format
Excluding homepage from restricting - Content Dripping WordPress Plugin
Excluding homepage from restricting
  • 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.
Displaying the restriction label on archive page - Tiered Membership
Displaying the restriction label on archive page

Front-End Example

Example of the restriction message - WordPress Restricted Site Access
Example of the restriction message
  • 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.
Hiding the admin bar - Content Control WordPress
Hiding the admin bar
  • 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.
Displaying the admin bar only for chosen user roles - Page Restriction WordPress
Displaying the admin bar only for chosen user roles

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. This option was introduced in version 1.5.8.
  • Allow only anonymous access - Only non-authorized users are allowed to view the content. 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. This option was introduced in version 1.4.10.
  • Access restricted by blacklist - Access is restricted only for users from the blacklist. This option was introduced in version 1.4.10.
  • 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. This options 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. This option was introduced in version 1.7.2.
  • Access denied X days from registration - Access is restricted for users that registered less than X days ago.
  • Restriction message view - 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. This feature was introduced in version 1.5.5.

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

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.