Password protecting specific categories is a way you can use to hide the content that you wouldn’t like to show your website visitors.
Key Features of Password Protected Categories in WordPress
- It supports any type of category in WordPress is it standard post or custom post.
- It locks all types of custom post type category.
- Whether it is a content of any type or any sub categories, they get’s protected automatically with password protection.
- Supports multiple passwords for each category.
- Permits you to modify WordPress user roles and capabilities.
- Creates customizable login page text and button.
- Allows you to choose whether to show or hide protected categories and their contents.
- Specifying the number of days before users have to re-enter the password is also possible.
You can password protect categories in either Category or post page. If you want to password protect a blog category, head over to Posts > Categories.
At the bottom of the form, you will see a new Visibility box that enables you to password protect categories, as well as make categories available only to Admin and Editor user roles. You can also add multiple passwords for the same category.
You need to note that the password is linked to that specific category. If a user logs in with a password for that category, he/she will automatically be directed to that specific category.
An important thing you need to keep in mind when building your password structure is that a user after entering the password automatically gains access to all subcategories of the category.
So, this is how you can password protect a category in WordPress without using a plugin.