Skip Navigation

Restricting access to pages in WordPress

There are certain pages only a logged-in user should see. For example, this is true for the "my account" and "my user profile" pages. You can easily hide such pages from visitors using Toolset.

To hide a page from visitors, you need to use the Post Groups feature of the Toolset Access plugin.

You can group pages that need to share the same front-end access permissions. In this example, you can create a group called “Logged-in users only”.

Bring pages under Access control

To add pages to Post Groups, our site’s built-in „Pages“ must be under Toolset Access control.

  1. Navigate to ToolsetAccess Control and ensure you are on the first tab, Post Types.
  2. Click Pages and check the Managed by Access option.
  3. Make sure all checkboxes in the Read column are selected.
  4. Click the Save button.

All pages of your site will now be available for visitors by default. Later, we will restrict access to certain pages by using Post Groups.

The pages on your site are now managed by Toolset Access.

Setting the access right for all pages

Create a post group for pages restricted to logged-in users

Next, you need to create a post group. For example, you can name it “Logged-in users only”.

  1. Go to ToolsetAccess Control.
  2. Switch to the Post Groups tab.
  3. Click Add Post Group button to add your first group.
  4. In the pop-up window that opens fill out the group name.
  5. Use the search field to find the pages you want to hide from visitors and add them to the list.
Creating a post group for pages restricted to logged-in users

Set access permissions for the post group

After creating the post group, a table appears, with permissions that different user types have for this post group.

You have to do two final things:

  1. In the Read column, uncheck the option for the Guest users.
  2. Click the pen icon that appears. In the pop-up dialog, select what visitors will see instead when visiting pages in this post group.
Removing read access from visitors (guests) and selecting what to display instead
Updated
November 18, 2020