Site Access Restriction (SAR) - Plugin Settings
Plugin Settings Overview
This plugin allows users to create a membership and content restriction solution. The content restriction is based on user WordPress roles and if they are logged in or not.
Setting up Access Restriction Pages
The first thing to set up after plugin installation is to define the pages to redirect in case the user is trying to access a restricted content page. There are two types of access restriction. First, when user is not logged in. Second, when user is logged in but he is trying to access a page which is restricted to his role.
1) Accessing the Settings
Go to Admin Panel, then CM Site Access Restriction Pro, then Settings to open the settings page.
2) Go to the General Tab
In the General settings, you can specify both URL.
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 show also for logged in users if they try to access content restricted to 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.
Also, you can restrict dashboard access to certain roles (Feature added in version 1.3.3)
3) Go to the Post Types tab
Next is the Post Types tab. In the section you can restrict all post which belongs to a custom post type and also restrict access to the general pages and posts. The available options are:
Access restricted to logged-in users - this means that all roles are authorized
Access restricted by role - once selected you can specify which roles can access content
Note for 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 would https://www.yoursite.com/wp-content/uploads/file
The image below has both Permalink and File URL highlighted: