Restrict users from viewing content based on their role

This shortcode will restrict users from viewing content based on their role.

How to Embed This Shortcode in Editor

[userpro_private restrict_to_roles=administrator,subscriber,author]
[userpro template=postsbyuser postsbyuser_type=product]

The roles can be specified by the admin as desired.

Shortcode Options


Options are used to customize the shortcode and can be assigned as a pair option=value in your shortcode like this.

[userpro_private option=value]

  • restrict_to_verified – Show or hide content from verified members. Default : 0
  • restrict_to_roles – Restrict the content to specific user roles.

Was this article helpful?

Related Articles

Leave A Comment?