Get started with the User Access Shortcodes plugin

How does it work?

In order to define who sees what in your Posts/Pages and custom types you will need to use the below shortcodes. The following examples shows you how to use the plugin on your site, you can copy paste the code and adjust the parameters to your liking.

Show content only for Guests

Shows content to guests only. Specific user IDs can be included using the id parameter. Administrators can be included with the special admin parameter.

[UAS_guest]
This content can only be seen by guests.
[/UAS_guest]

Parameters

  • in (comma separated user IDs) – include users by ID.
    • [UAS_guest in=”34, 70, 117″][/UAS_guest]
  • admin (0 or 1) – can the admin see the content?
    • [UAS_guest admin=”1″][/UAS_guest]

Show content only for Registered/Logged in users

Shows content to logged-in users only. Specific user IDs can be excluded using the ex parameter.

[UAS_loggedin]
This content can only be seen by logged in users.
[/UAS_loggedin]

Parameters

  • ex (comma separated user IDs) – exclude users by ID.
    • [UAS_loggedin ex=”23, 367″][/UAS_loggedin]

Show content only for specific roles

Shows content to logged-in users with a specific role only. User roles are specified using the roles parameter. Should you want to hide the content for these roles instead of showing it, use the inverse parameter below.

[UAS_role roles="administrator, editor"]
This content can only be seen by administrators and editors.
[/UAS_role]

Parameters

  • roles (user roles) – user roles that are allowed. Users with at least one of the specified roles will be able to see the content.
    • [UAS_specific roles="subscriber″][/UAS_specific]
  • inverse (0 or 1) – if set to 1, users with at least one of the specified roles will not be able to see the content (anyone with none of the specified roles will).
    • [UAS_specific ids=”45″ admin=”1″][/UAS_specific]

Show content only for specific users

Shows content to logged-in users with a specific ID only. User IDs are specified using the id parameter. Should you want to hide the content for these IDs instead of showing it, use the inverse parameter below.

[UAS_specific ids="45, 645, 706"]
This content can only be seen by users with ID 45, 645 or 706.
[/UAS_specific]

Parameters

  • ids (user IDs) – user IDs allowed to see the content.
    • [UAS_specific ids=”45, 543, 5, 3″][/UAS_specific]
  • admin (0 or 1) – can the admin see the content?
    • [UAS_specific ids=”45″ admin=”1″][/UAS_specific]
  • inverse (0 or 1) – if set to 1, users with the specified IDs will not be able to see the content (everyone else will).
    • [UAS_specific ids=”45″ admin=”1″][/UAS_specific]

Need more help?

For additional help, please contact us.