1. Knowledge Base
  2. Password Protected Categories
  3. Getting Started

Creating a central login page for your WordPress password protected categories

There are two ways for visitors to log into your WordPress password protected categories:

  1. When they visit a password protected category (i.e. the category archive) or visit one of the posts inside the category, or one of its sub-categories. The visitor will be shown the login form where they can enter a password. They must enter the correct password for the category to unlock it and reveal the contents.
  2. From a central login page. The central login page allows the visitor to login to any password protected category on your site. A login form is displayed on this page where the user can enter a password.

If the user enters a correct password for a category, they will automatically be redirected to that category. The login form will direct them to the first matching category that it finds, so it makes sense to use a different password for each category to avoid any potential conflicts.

How do I create a Central Login Page?

Add the shortcode [category_login]. You can add it to a ‘Shortcode’ or ‘Paragraph’ Gutenberg block, to a text widget, or to the main page content within the classic WordPress editor:

You can then link to this page as you require, e.g. adding the page to your main menu, etc.

Can I customize the message in the category login form?

By default, the message that you have entered on the plugin settings page will appear above the password login form. You can override this for each individual login form by adding message="your message here" to the login form shortcode. For example, the following shortcode will add a password protected category login form with the text “Please enter your password below:”

[category_login message="Please enter your password below:"]

Still need help?

If searching the knowledge base hasn't answered your question, please contact support.

Related Articles