User Registration Documentation
Note: The following doc contains the Basic Content Restriction Procedure. We have developed another Advanced Method of Content Restriction recently. To skip this and jump to that, Click Here.
You can now restrict the posts or pages. To restrict go to the page and check to 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 options in the settings allows you to choose an option to who can see the restricted contents. The default is all logged in users. You can change it to allow 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 the only administrators whatever the setting in the global is.
You can also restrict the partial contents of the pages or posts. Use the shortcode [urcr_restrict]...[/urcr_restrict].
[urcr_restrict]...[/urcr_restrict]
This will restrict the paragraph under the shortcode. Who can see these contents depends on the global settings similar to full contents.
To override global settings to specific posts/pages. You can pass the parameter access_role to the shortcode. When you pass parameters, the settings in global does not matter.
access_role
Examples:
[urcr_restrict access_role ="administrator"] will allow access to the only administrators.[urcr_restrict access_role ="guest"] will allow access to only non-logged in users.
[urcr_restrict access_role ="administrator"]
[urcr_restrict access_role ="guest"]
[urcr_restrict access_role ="administrator,contributor"] will allow access to administrators and contributors.
[urcr_restrict access_role ="administrator,contributor"]
To allow access to all logged-in users: Pass argument access_role with a value all_logged_in_users.
all_logged_in_users
e.g. [urcr_restrict access_role ="all_logged_in_users"]
[urcr_restrict access_role ="all_logged_in_users"]
Message in the settings allows you to write the message instead of the restricted contents.
Powered by BetterDocs