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

[sws_shortcode width=”100%” float=”left” class=”sws_blue”] [/sws_shortcode] [sws_divider_padding]

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

[sws_shortcode width=”100%” float=”left” class=”sws_blue”] [/sws_shortcode] [sws_divider_padding]

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

[sws_shortcode width=”100%” float=”left” class=”sws_blue”] [/sws_shortcode] [sws_divider_padding]

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.

[sws_shortcode width=”100%” float=”left” class=”sws_blue”] [/sws_shortcode] [sws_divider_padding]

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

[sws_divider_basic]

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

[sws_divider_basic]

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

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