Private Area documentation

Introduction

Private Area allows you to create restricted sections of your website that only certain users can access, and that are completely invisible to search engines.

The plugin is a standalone component, which means that you can use it on any WordPress theme available.

Create private pages

The core concept of the plugin is to create private pages that are hidden from both the public and search bots, but are available to a limited set of users of your choice.

After you’ve installed and activated the plugin, you can begin creating a private area on your website by creating a new page, making sure to associate the “Private area” page template to it.

All pages that have associated that page template will effectively make up the private area of your website. Private area pages can be used just as regular pages, and associating the “Private area” template to them doesn’t do anything specific, other than marking them as private: once a page is saved with that template, it is instantly excluded from indexing.

The page template being used to identify private pages is declared in the plugin itself. You can override it from your theme or child theme of choice, making sure to create one with the template-private-area.php filename, in the theme root.

Managing pages

After you’re done creating pages, you can open the plugin settings page under Settings > Private area, in your WordPress dashboard.

From this screen, you’ll be able to control three different aspects of your private area:

  1. What happens after a user logs in,
  2. Which sets of users can access your pages,
  3. Whether to leave or disable the admin bar for users accessing your pages.

Logging in

By default, in WordPress users are redirected to the WordPress dashboard after logging in. You can change this behavior automatically by tweaking the “Redirect after login” option in the Settings page.

From this option, you can either leave redirect as they are by default in WordPress, choose to redirect users to your home page, or pick a first-level page from the ones you’ve marked as private.

Controlling user access

From the “Access control” section of the plugin Settings page, you’ll be able to control which users have access to the different pages that compose your private area.

In this section of the Settings page, all private pages are listed. For each page, you can select which user roles have access to that page.

Keep in mind that you can add multiple roles per page, and that leaving the roles select empty will in fact make those pages accessible only to administrators.

In the case of nested pages, that is one page that is child of another private page, you can indicate that the child page should inherit the access property from its parent page. This is very convenient if your private area has a more complex tree structure, and you don’t want to repeat the configuration for each and every page.

Disabling the admin bar

In some cases, it may be helpful to disable the admin bar completely to sort-of mask the fact that you are in WordPress. You can do so for non-administrator users by checking the “Disable admin bar” option checkbox in the Settings page.

Writing content for private pages

As we said above, private pages are just regular pages using a specific page template. As such, there is absolutely no limit to what you can add to them.

For example, you can use Gutenberg to add a private area navigation as a reusable block to your private pages, and then proceed structuring your pages in any way you can think of, perhaps using our Grids plugin for layout.

Alternatively, just know that shortcodes work just fine in private pages as well, and that you can also use any page composer plugin of your choice for the job, if you’re feeling more confident with one of those.