Role Visibility

Initial Set-Up

After installation, you'll first need to set up a No Access Page, which is where your users will be redirected when they have no access to a page.

  1. In your admin area, go to Pages.
  2. Create a new page.
  3. Add the [role_visibility_msg] shortcode in the body content.
  4. Save it.

Then navigate to Settings > Role Visibility.

License

  • License ID: Enter your license ID.

General

  • No Access Page: Select the page that you created above.
  • Login URL: The URL of your login page.
  • Delete All Data on Uninstall: This will clear all of your settings from this page and all of your posts and pages when you uninstall the plugin. It is recommended to keep this unchecked until you're ready to uninstall it permanently. That way if you need to uninstall for another reason you won't have to start over.
  • Reset Plugin Settings to Default: Does not reset posts/pages, just the settings on this page.

Default Messages

  • Default Message for Logged-In Only: This is the default message that people will see if they are logged out and the page is set to "Logged-In Only". You can override this on the individual post/page settings.
  • Message Template for Logged-In Only: This is the template used to display the message you set above for people that are logged out and the page is set to "Logged-In Only". You must include {role_visibility_msg} to display the message. If you want them to have the ability to login and be redirected to the page they were trying to access, include {login_link}. If you want to add a retry link, include {retry_link}.
  • Default Message for Logged-Out Only: This is the default message that people will see if they are logged in and the page is set to "Logged-Out Only". Useful for custom login pages. You can override this on the individual post/page settings.
  • Message Template for Logged-Out Only: This is the template used to display the message you set above for people that are logged in and the page is set to "Logged-Out Only". You must include {role_visibility_msg} to display the message. If you want to add a lougout link, include {logout_link}. If you want to add a retry link, include {retry_link}.
  • Missing Role Message: This is the message that users will receive when they try to access a page that is set to logged-in only with a specific role that they do not have. You can override this on the individual post/page settings.
  • Message Template for Missing Role: This is the template used to display the message you set above for people that are trying to access a page that they do not have the proper role for. You must include {role_visibility_msg} to display the message. If you want to add a retry link, include {retry_link}.

Post Types

  • Which Post Types to Enable: Set the post types you want to include role visibility options for, and choose a default access option for it.

Roles

  • Which Roles to Include: Add the roles you want to include for the "Logged-In Only" option.

Changing the Visibility for a Post or Page

Navigate to your Posts or Pages (or whatever post type you enabled).

You'll now see a column in the list table called "Role Visibility" that shows you the current visibility of the page. You can edit the visibility for a post or page from this table in the Quick Edit or Bulk Actions.

You can also Edit the post or page and make your changes in the Role Visibility section below the editor.

  • Who should have access to this page?: Options are "Default" (which is what you specified in Settings), Everyone, Logged-In Only, and Logged-Out Only.
    • Logged-In Only: If you do not choose any roles, it will allow anybody that is logged in to see the page. Otherwise, only the roles you select will have access. You can change the roles on the Settings page.
    • Logged-Out Only: Only users that are logged out will see this page. This is mostly used for login and registration pages.
  • Choose a message to display instead of the default: The default message is the one you specify in Settings. You can override it here.

Visiting a Page with No Access

It is strongly advised that you test access to the pages you use this plugin on to ensure that the user sees what you want them to see.

Sign In

Register

Reset Password

Please enter your username or email address, you will receive a link to create a new password via email.