Central category login page
There are two ways for visitors to log into your password protected categories:
- 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.
- 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 conflict.
How do I create a Central Login Page?
- Create a central login page adding the shortcode
[category_login]to a blank page in WordPress. You can also use this shortcode inside a sidebar widget (e.g. a text widget), so users can login from the sidebar.
- 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:"]