Content Restriction

Activating Content Restriction

The Content Restriction feature is available starting with version 2.6.9 of Profile Builder Free, Hobbyist and Pro

To activate this feature go to Profile Builder -> General Settings and select Yes for the “Content Restriction” entry, then hit save changes.

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

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