Sometimes you want to password protect a category or certain categories in your WordPress website. Or wish only logged-in users to access protected categories or custom post types category (taxonomy) within a public blog.
The idea here is, prompt the visitor to enter the password when she/he tries to view a post that belongs to a restricted category. Alternatively, it could be marking categories as private. So that users with appropriate roles could see all posts in those categories only after logging in.
By default, WordPress offers this feature on a per post basis. But there is no built-in option to protect a whole category. To overcome this issue, the Password Protected Categories plugin comes to the rescue.
The plugin offers to lock any type of WordPress category (hierarchical taxonomy), either it is for a standard post or a custom post type like events, portfolios.
Key Features of Password Protected Categories Plugin
- Allows adding one or more passwords for each category to protect it.
- Offers role-based access to private categories for logged-in users.
- Is compatible with major plugins like Easy Digital Download, the Events Calendar.
- Instantly protects the category, its sub-categories, & all its posts after adding the password.
- Keeps protected posts and categories hidden as well as no-indexed from search engines.
- Automatically redirects the user to the correct category page based on the password entered.
- Supports locking of all standard or custom post type categories. No matter it was created by either the theme or a third-party plugin.
Installing & Configuring Password Protected Categories Plugin
Installing and configuring the plugin settings are quite simple and take only a minute or two. This video tutorial will help you understand how to quickly get the plugin ready to use.
Additionally, below is a screenshot of plugin settings from the Settings → Protected Categories menu. You see that there are no complicated settings for the plugin. Also, it has nifty options to customize the password input form.
You can customize the category login page with help of a shortcode as well. This allows you to use it inside a page builder or make the page rich and more compatible with your theme design.
We do offer setting up the plugin for you as per the requirement at a very reasonable cost. Just drop us an email at firstname.lastname@example.org. We can also customize features without losing them in the next plugin update.
How to Protect Category with Password in WordPress
To protect a category with a password, go to the Categories menu of the relevant post type, like ‘Events → Categories’. There you will notice a Visibility field on the Add/Edit Category pages.
There are 3 options namely Public, Password protected, and Private. First, select the second option, Password protected. Then enter a password. Press the + button to add more passwords. Similarly, use the – button to remove an existing password for the category. Finally, save the changes by clicking the add or update button.
Isn’t that easy? It is what this Password Protected Categories plugin offers. And the features list doesn’t end here. You can also lock multiple categories by making them children of one single password protected category and setting the visibility of these subcategories to Public.
Furthermore, you can also protect a complete custom post type like ‘Portfolio’ or even the entire blog using a similar way. Now let us see how does the private categories option in the plugin gives us more power to protect contents.
How to Protect Posts using Private Categories
As said earlier, WordPress allows you to control the visibility of a post. When you choose Password protected then visitors must have to enter that specific password to view the post. It doesn’t matter if the user is logged in or not.
Whereas, if you opt for Private then a user must be logged-in first to read the post. Furthermore, she/he should also have either Administrator or Editor role assigned. The rest of the users and anonymous visitors will not be aware of private content.
The plugin extends the exact feature for categories as well in the same WordPress fashion. When you set the category visibility to Private, only administrators and editors can view pertaining posts after signing in.
However, most often we wish that registered users with other roles (like subscribers or contributors) to have access to private categories and posts. So that instead of entering the category-specific password, they could read the content after simply logging into their account.
Fortunately, there is a simple solution to accomplish this. We will cover that in a separate article sooner.
Can I Password Protect WooCommerce Products and Categories too?
Definitely, you can. Since WooCommerce products and categories are custom post type and taxonomy each. So the plugin will work well with them too.
However, there are dedicated plugins to particularly protect WooCommerce categories and pertaining products with passwords or private areas. I encourage you to check WooCommerce Protected Categories as well as Private Store plugins.
Protected Categories and Custom Taxonomy – Final Thoughts
So the Password Protected Categories plugin is quite promising for the specific task. It lets you
- Password protect categories
- Make categories private
And it works very well for any custom post type taxonomies too. So it is simple to set up and takes only a few minutes to start protecting content. It’s the plugin I recommend to password protect category in your WordPress website or blog.