How to Password Protect WordPress Content based on Levels

This feature allows you to automatically protect all fresh content once they are published as well as set password levels to unlock them.

Currently, we support to protect WordPress Posts and WooCommerce Products Categories based on Levels. If your custom post type uses built-in WordPress Categories, you have to add this post type to Post Type Protection option under PPWP Pro settings page.

Requirements:

In this tutorial, we will walk you through the following sections:

How to create password access levels

Step 1: Create a base

Once installing and activating PPWP Access Levels extension successfully, go to Password Protect WordPress >> Access Levels from your admin panel.

Click on Add New Base button.

This will bring up a popup window where you can add a base name (required) and a base description (optional).

Step 2: Order categories based on levels

After creating a base, click on Edit Levels button link.

Then you select which post type and the categories you want to protect.

Please note that Products does not display under Post Type option by default. If you want to select Products type, you have to add it to Post Type Protection option under PPWP Pro settings page first.

You can also protect these content by levels. Content under a specific level will be unlocked by a password in the same or higher levels.

Because “Markup” category isn’t added to any levels, it will be assigned to Level 0 by default.

Unselected categories will be assigned to Level 0 by default. That means their content will be unlocked by any password at any level.

Please note that:

  • You can’t remove a selected category from Base once levels are created
  • You have to select at least one category before adding a new level
  • You need to delete levels in order. In other words, you can’t remove level 1 if level 2 still exists.
  • Deleting a level will remove all associated passwords.

Step 3: Create password access levels

Once you select a category to a base, all content under this category will be password protected, including the new one. To unlock these posts, you need to create a password with the corresponding level.

To achieve it, switch to Add New Password tab and generate a password with these pieces of information:

  1. Password requirements: unique, no space, case-sensitive and limited to 100 characters.
  2. Label: Allow to give some extra information for your password, e.g. what it is used for.
  3. Password Level: assign a level to this password. Higher-level passwords can unlock all content in the same or lower levels.
  4. Password Type:
    • Global (default): anyone with the password can unlock the protected content
    • Roles: only specific user roles are able to use the password to access the private content
      • Let’s say you set a password with type Role (editor)
        • Only editors can use this password to unlock your protected base
        • Other roles, e.g. subscribers, will receive an error message when entering it into password form
  5. Usage Limit: the maximum number of times a password is used.
    • Let’s assume that the usage limit of a password is set to 1. If a user enters that password to unlock the base, the others can’t use it any more.
    • This feature proves useful to prevent others from sharing your passwords without permission.
  6. Password Expiry: Another way to stop the users from abusing your password is to make it auto-expire after a period of time. In other words, they can’t use that password to unlock your content after a given time.

After creating a new secure password successfully, you will be redirected to the Manage Passwords tab, where you can see and manage all your created passwords.

Feel free to create as many passwords at a specific level as you want.

How to manage bases

Under Access Levels Management dashboard, you can

  • Create as many bases as you wish. You can create a base to protect Posts and another to protect Products, for example.
  • Switch base status from active to inactive and vice versa
    • If you deactivate a base, all content belonging to this base will become unprotected.
    • When you re-activate a base, all its content will become protected again.
  • Delete a base
    • If a base is deleted, all its passwords are removed too. In other words, you can set these passwords to protect other bases.
    • All content belonging to this base will become unprotected. So you can add the selected categories to other bases.

How password access levels work

Password access levels is a system in which higher-level passwords can unlock all content in the equal or lower levels. For example, you can use password level 2 to unlock all content belonging to categories in level 2, 1 and 0.

Lasted updated on December 26, 2019