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]
[/userpro_private]
The roles can be specified by the admin as desired.
Shortcode Options
Example
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]
[/userpro_private]
- restrict_to_verified – Show or hide content from verified members. Default : 0
- restrict_to_roles – Restrict the content to specific user roles.
Leave A Comment?