Site Access Restriction (SAR) - Shortcodes

Access restriction Shortcodes

The plugin produces a shortcode which support restricting content only to part of the content within the post / page. This means that the entire post can be visible and only part of it will be visible to specific WP roles.

The shortcode looks like this:

[access role="user role" cap="capability" userid=123 guests=1 login=1 deniedtext="Text which will see users that cannot see the content" reverse=0]  Put the restricted content here [/access]

All shortcode parameters are optional.

Using the shortcode you can hide the content by Wordpress role, capability or user ID.
Use the  guests=1 parameter to show content only for not logged-in users.
Use the  login=1 parameter to show content only for logged-in users.

Use the  deniedtext parameter to display an optional text.

Use the reverse=1 parameter to reverse the access condition and show the content only when the condition is not met.

More information about the Site and Content Restriction WordPress Plugin

Other WordPress products can be found at CreativeMinds WordPress Store

Let us know how we can Improve this Product Documentation Page

To open a Support Ticket visit our support center