Installation & basic setup
The WordPress Password Protected Categories plugin makes it easy to protect categories of blog posts or other custom post types. Watch it being set up in this video, or read written instructions below.
1. Install Password Protected Categories
Once you have purchased Password Protected Categories, you will receive a confirmation email containing your license key and a download link to the plugin. If you don’t receive this email, please check your spam folder. If it’s not there, please send us a support request.
Your confirmation email also contains a link to download your purchase invoice as a PDF.
Once you have downloaded the WordPress password protect plugin, go to your WordPress admin, then go to Plugins → Add New → Upload Plugin. Click Choose File and select the ‘protected-categories.zip’ file you just downloaded. Once uploaded, click ‘Activate’.
2. Enter your license key
Once activated, go to Settings → Protected Categories and enter your license key. This should be contained in the email confirmation that was sent to you after purchase. Click Save Changes to validate and store your license key. If you get an error saving your license key, please try a second time. If the error persists, please view the article on license key problems.
3. Configure the plugin settings
You will find the settings for the plugin in Settings → Protected Categories.
Enter your license key here. The plugin will only work with a valid license key.
This setting controls how long the user will remain logged into a category before their password expires. This works by adding a cookie in the user's browser. The minimum cookie expiry period is 1 day and the maximum is 9999. Enter the number of days you would like people to remain logged in after unlocking a protected category.
Note: If you change or delete a password then users will no longer be able to access the category under the old password, even if the cookie has not yet expired.
Ticking this box will show your password protected categories, their sub-categories and posts on the public parts of your site. Users must still enter a password in order to access the single post pages, but will be able to see them on the public areas of your website. For example, they will appear on the main Blog page, widgets, navigation menus and search results. If someone tries to click on one then they will be taken to the category login page.
Untick the box to hide the protected categories and their contents from public view, so that only people with the password will be able to see them at all.
For navigation menus, this option only works if you have added the links to the menu as a category or post. It does not work if you have added them as ‘Custom Links’.
- Ticking this box only affects the visibility of protected categories and posts for users who have not yet entered the correct password. Once a user enters the correct password, the category will be ‘unlocked’ to them and will always be displayed for that user, regardless of this setting.
- This setting does not affect private categories, which will always be hidden from public view.
Private, user and role restricted categories
The following options apply to WordPress categories that are restricted to specific roles or users.
When logged out
Choose what happens when someone without the correct privileges tries to access a role or user protected category:
- Show 404 error - Display a 404 error, so it appears as a broken link. This is a good way to hide the fact that the hidden category and its contents even exist.
- Show WordPress login page - Redirect people to the default WordPress login page (/wp-login.php) so that they can log into their account.
- Show custom page - Alternatively, select any page on your website for people to be redirected to.
Note: If a category is password protected as well as restricted to specific roles or users, then this option will be ignored and the password login form will be shown instead.
This option appears if you select 'Custom page' in the 'When logged out' dropdown. It lists all the pages on your WordPress website.
Choose which page you'd like people to be redirected to when they try to access a role or user protected category. For example, you can select a front end login page if you have one (if not, then we recommend the free Theme My Login or Profile Builder plugin for this). Alternatively, if you're creating members-only categories then you could redirect people to a page that explains that the content is for members-only with details on how to join.
These settings control the login form for password protected categories and posts. This will appear whenever someone clicks on a link to a protected category or its posts. You can also add a central login form anywhere on your website by adding the shortcode
This option controls the main title for the login form. Delete the text if you don’t want to display a title.
Use this option to customise the wording shown on the password form (before the password box and login button). This will replace the default text.
You can format the text using HTML code to add lists, images etc. as required.
Tip: You can also customize the message for each individual category login form on your site.
This setting controls the label used next to the password box on the login form. Defaults to “Password:”.
Tick this to put the label inside the password box (i.e. a placeholder) rather than in front of it.
Use this option to change the text that appears on the ‘Login’ button for the category login form.
4. Start protecting categories!
You are now ready to start protecting your categories.How to protect categories
Plugin installation & setup service
If you don't want to set up the plugin yourself, the one of Codeable's WordPress experts will be happy to do it for you. They can install and set up Password Protected Categories to meet your exact requirements.
To book the plugin setup service, simply click the 'Get Started' link above and enter your information. The price and project description have been pre-filled for you. You should read through the description and add information about which protected categories you need. You can then submit the project, and a Codeable expert will contact you soon.