1. Home
  2. Knowledge Base
  3. Uncanny LearnDash Toolkit Pro
  4. Restrict Page Access

Overview

The Restrict Page Access module enables admins to restrict access to any public-facing page (post, course, lesson, topic, quiz, etc.) based on several criteria.  Users that are denied access can then be shown a message or redirected to another page.

Set up restricted access

The Restrict Page Access module, when active, adds a metabox to the sidebar of the Edit Post page of every post type that is registered as public:

Here’s how to set up restricted access:

  1. Check Users must be logged in to view this page to prevent logged-out users from accessing the page.
  2. Select one or more Required roles if only users with a specific role should be allowed to view the page.  Users with ANY of the selected roles will be able to view the page.
  3. Select one or more Required courses if only users enrolled in a specific course should be allowed to view the page. Users enrolled in ANY of the selected courses will be able to view the page.
  4. Select one or more Required groups if only members of a specific group should be allowed to view the page.  Members of ANY of the selected groups will be able to view the page.

Access rules and examples

  • If multiple selections are made within a single field (role, course, group), the user must match ONE of the selections in the field to be granted access.  Example:
    • Sales 101 and Customer Service 101 are set in Required course
      Users that are enrolled in Sales 101 OR Customer Service 101 will have access to the page
  • If restriction criteria are set in multiple fields (role, course, group), the user must match at least one criteria in each field to be granted access
    • The Customer role is set in Required role, and Sales 101 is set in Required course
      Users that have the role Customer AND are enrolled in the Sales 101 course will have access the page

Set up a redirect if access is denied

If you would like to redirect users that are denied access to the page because they don’t meet the access criteria, check the Redirect if access is denied checkbox.  You can then choose from the following two options:

  • Page – Select a page from a dropdown containing all of the publicly-available posts on your site
  • Custom URL – Enter a custom URL for the redirect

Set up a message if access is denied

If you would like users that are denied access to the page to stay on the page but see a custom message, set up the message in the module settings:

Was this article helpful?

0 replies

Comments/Questions

Please note that this is not an official support channel and questions/comments may go unanswered.
To request support, log in to your account and click Submit a Request.

Leave a Reply

Your email address will not be published. Required fields are marked *