Content Restriction

Activating Content Restriction

Note – You will find Content Restriction on Profile Builder Free, Hobbyist and Pro  version 2.6.9 or higher.

To activate Content Restriction you will need to go to the Profile Builder General Settings sub-page and select Yes for the “Content Restriction”, then click Save Changes.

After this, you will find Content Restriction sub-page under Profile Builder page.

Content Restriction Page

  • Type of Restriction – set the default type of restriction
    • Message – show the user a custom message instead of the restricted content that he was trying to access
    • Redirect – define a page that users should be redirected to if they don’t have access to the content they were trying to access

  • Redirect URL – the default redirection when accessing a restricted post
  • Message for logged-out and logged-in users – the default message displayed instead of the post content when accessing a restricted post
    • Message for logged-in users – when user is logged-in but does not have the required user role
    • Tags that can be used in messages:
      • {{display_name}} – current user display name (if user is logged-in)
      • {{current_user_role}} – user role of the current user (if user is logged-in)
      • {{unrestricted_user_roles}} – display the user role(s) that can view the content

  • Restricted Posts Preview – show a portion of the restricted content, a number of words or the content before the “more” tag (if there is a “more” tag in that post)

Content Restriction Meta-Box

  • Type of Restriction
    • Settings Default – take the type of restriction selected in the settings page
    • Choose a individual restriction type for this specific page / post / custom post type
  • Display For – restrict this page / post / custom post type for the logged-out users or for the users without a specific role