Content Restriction add-on to the User Registration plugin.
- First, purchase the User Registration – Content Restriction add-on.
- After the process succeeds, you will get the add-on zip file under your WPEverest account page.
- Now, you can download the add-on zip file from there.
- After you log into your WordPress Dashboard, go to Plugins > Add New and click Upload Plugin button available there and choose the file you’ve downloaded and click Install Now button. Make sure to install the user-registration plugin too.
- This will install the add-on. Now, you’ve to activate the addon from the Install plugin list.
- Now you are ready to use this add-on for your site.
Setup and Configuration
Full Content Restriction
You can now restrict the posts or pages. To restrict go to the page and check restrict full contents in the meta box:
Now, this page is restricted. Who can see the posts/pages depends on the global settings. Go to user registration->Settings->Content Restriction
Allow access to option in the settings allows you to choose an option to who can see the restricted contents. Default is all logged in users. You can change it to allow the access to only specific roles.
However you can override the global settings for specific pages/posts from the meta.
Now this page/post is accessible to only administrator whatever the setting in the global is.
Partial Content Restriction:
You can also restrict partial contents of the pages or posts. Use the shortcode
This will restrict the paragraph under the shortcode. Who can see this contents depends on the global settings similar to full contents.
To override global settings to specifc posts/pages. You can pass the parameter
access_role to the shortcode. When you pass parameters, the settings in global doesnot matter.
[urcr_restrict access_role ="administrator"] will allow access to only administrator.
[urcr_restrict access_role ="administrator,contributor"] will allow access to administrator and contributor.
To allow access to all logged in users: Pass argument
access_role with value
[urcr_restrict access_role ="all_logged_in_users"]
Message in the settings allows you to write the message instead of the restricted contents.