1. Documentation
  2. Restrict Content
  3. [gamipress_restrict_content]

[gamipress_restrict_content]

Restrict a portion of content to be unlocked through points.

Attributes:

  • id – Identifier for this portion of content.
  • points – Points amount required to unlock this portion of content.
  • points_type – The points amount points type required to unlock this portion of content. Accepts any registered points type slug
  • granted_roles – Manually grant access to this portion of content to users by role. Accepts any registered role or a comma-separated list of roles
  • granted_users – Manually grant access to this portion of content to the users you want. Accepts any user ID or a comma-separated list of user IDs
  • message – Text that is shown to users that haven’t unlocked this portion of content.
  • guest_message – Text that is shown to non logged in users.

Example: [gamipress_restrict_content id="content-123" points="100" points_type="credits" granted_roles="contributer,editor" granted_users="1,2,3" message="This content is restricted"]
Content to show to users that got access
[/gamipress_restrict_content]

Important: Remember that you need to close the shortcode:
[gamipress_restrict_content]{content}[/gamipress_restrict_content]

Was this article helpful to you? Yes No

How can we help?