[restrict] . . . [/restrict]
This is the shortcode you will use to restrict a portion of content to registered users only. It has several parameters that let you define whether the content is restricted to paid users only, which user levels can view the content, and also the message that should be displayed to non-authorized users.
- paid - whether content is viewable by paid users only. Options: true/false; default: false.
- level - the access level (set by the membership level) required to view this content
- subscription - the membership level(s) users must be subscribed to in order to view this content. You must use the ID of the membership level(s). To allow multiple membership levels to view the content, separate IDs by a comma.
- userlevel - the user role(s) that can view this content. This accepts any user role slug, including custom roles. You can enter a comma-separated list to grant access to multiple roles. Examples of roles include:
- none - all user roles - default
- message - the message that is shown to users in place of the short code's content when viewed by an unauthorized user. Default: option defined in the Settings page.
Note: Using the [restrict] shortcode without any parameters will restrict content to any logged in user, regardless of their membership status.