Getting Started with Restrict Content

Restrict Content Settings

Restrict Content has two setting options:

  1. Restrict Message – Message displayed when using the 

[restrict] shortcode and a user does not have the appropriate permissions.

  • User Level Restriction Messages –  Message displayed based on the User Level restricted content. 
    Administrators – Message displayed when a user does not have permission to view Administrator restricted content. 
    Editors – Message displayed when a user does not have permission to view Editors restricted content. 
    Authors – Message displayed when a user does not have permission to view Authors restricted content. 
    Contributors – Message displayed when a user does not have permission to view Contributors restricted content. 
    Subscribers – Message displayed when a user does not have permission to view Subscribers restricted content.
  • rc-settings.png

    Post Meta Settings

    Post Meta allows you to restrict some or all of the content on a page by using the [restrict] . . . [/restrict]

     shortcode.

    You can also define whether which userlevel the content is restricted for by using the following parameters. 

    Parameters:

    • 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
      • administrator
      • editor
      • author
      • contributor
      • subscriber
    [restrict userlevel="subscriber"] restricted content only visible to subscribers [/restrict] 
    Everything else on the page will be visible to everyone. 


    You can also specify a User Level. This will restrict the entire page, and the content will only be visible to the user with the specific User Level.  

    For example, if you use the User Level restriction to restrict the content for Administrators, any user who is not an administrator will not be able to view the content, but instead will see the Restrict Message according to their User Level found within Restrict Content Settings as pictured above. 

    test-page-editing.png

     

    Example #1:

    When a member of the public or non-logged-in viewer looks at this post, this is what they will see. This post was restricted to Subscribers in the Restrict Content Pro restrictions meta boxes on the editing screen. These people will see restrictions that were configured in the Restrict Content settings “This Content is Restricted to Subscribers”.

    not-logged-in2.png

    Example #2:

    When a logged-in user with the user role “Editor” looks at this page, this is what they will see. This post was restricted to Administrators in the Restrict Content restrictions meta boxes on the editing screen. Editors will see the Restrict Content restrictions messages that were configured in the Restrict Content settings, that relate to their own user role as Editors: “This Content is Restricted to Editors”.

    logged-in-as-editor.png

    Have more questions?

    Submit a request