Restrict access to Content

Restrict access to Content by User Role

If you use this shortcode the content will only be visible to the Editor. You can replace the editor with any other user role

[pur_not_logged_in] You can see this content if you are not logged in. [/pur_not_logged_in] Your content that is only visible to the editor [/pur_restricted]

You can also add the capability view_restricted_content to any user role and then the user with the specific user role can view restricted content. It works with the following shortcode

[pur_restricted] Add your restricted content [/pur_restricted]

And you can use this for showing content on the page for users that are NOT logged in.

[pur_not_logged_in] Add your content visible to users not logged in [/pur_not_logged_in]

And you can restrict content to a specific user role by using the following shortcode. The user role can be replaced with any user role in your site.

[pur_restricted_alt capability='contributor'] Add your content only visible to the Contributor [/pur_restricted]

If you have the right access level to this post you can see a picture of the plugin that is used to restrict access to content. This is a really helpful plugin that makes it possible for you to show different content depending on the user role your visitors have.
If you login as an Editor you can see even more content on this page.

Try login using the following information:

Username: Editor
Password: TryMeNow

Content shown to users that are not logged in:
You can see this content if you are not logged in. 

Content shown if you are not editor:
If you are not an editor you can see this text.

Content shown if you are not administrator:
If you are not an administrator you can see this text.