Entire categories can be password protected. The benefit of this method is that it makes it easier to add password protection to multiple pieces of content, and it's also simpler for site visitors because they only have to enter their password once to unlock all the content in that category.
![图片[1]-如何用密码保护 WordPress 帖子类别-光子波动网 | WordPress教程、Elementor教程与故障修复](https://www.361sale.com/wp-content/uploads/2024/07/2024073008574111.png)
However, to set this up, you need the help of a plugin. We recommend two options:
- Password-protected category, which is a premium plugin for Barn2 MediaThe
- Access Category Passwords, a free plugin on WordPress.org
How to use password-protected categories
The password-protected category works essentially the same as will be seen in the previous section"Password protection."function is added to the category.
After installing and activating the plugin, you can go toPosts → Categoryand edit the category to which you want to add the password. At the bottom, you'll now see the same password used to password protect individual pieces of contentVisibility box.
optionpassword protectionand enter the desired password.
One of the advantages of the plugin is the ability to add multiple passwords, each of which unlocks categories. This makes it possible to assign a unique password to each person/group so that access can be removed more easily if needed later:
![图片[2]-如何用密码保护 WordPress 帖子类别-光子波动网 | WordPress教程、Elementor教程与故障修复](https://www.361sale.com/wp-content/uploads/2024/07/2024073008454468.png)
After saving the changes, visitors will be prompted to enter a password whenever they try to access a post in a password-protected category:
![图片[3]-如何用密码保护 WordPress 帖子类别-光子波动网 | WordPress教程、Elementor教程与故障修复](https://www.361sale.com/wp-content/uploads/2024/07/2024073008460241.png)
By entering theSettings → Protected categories, there are also some additional settings that can be accessed which control the functionality of the plugin. Can:
- Set the expiration date of the password (e.g., how long after the content is unlocked will the visitor need to enter the password again).
- Choose whether to still display content from protected categories in public areas of the site, or whether to hide them completely until someone enters a password.
- Customize the login form seen above.
![图片[4]-如何用密码保护 WordPress 帖子类别-光子波动网 | WordPress教程、Elementor教程与故障修复](https://www.361sale.com/wp-content/uploads/2024/07/2024073008481436.png)
How to use access category passwords
Access Category PasswordAvailable for free at WordPress.org. Once installed and activated, you can go toSettings → Access category passwordThe
There, it's possible:
- Select the password to use.
- Select the category that requires password protection.
- will someuser rolewhitelisted so they can see hidden categories without having to enter a password.
- Choose whether the excerpt will still be made public or all content will be hidden.
- Customized login page/password protection notification.
![图片[5]-如何用密码保护 WordPress 帖子类别-光子波动网 | WordPress教程、Elementor教程与故障修复](https://www.361sale.com/wp-content/uploads/2024/07/2024073008525763.png)
Save ChangesAfter that, visitors will need to enter a password when trying to access any content in the restricted category.
While this plugin is free, one drawback is that you can only enter one password and you have to use the same password for all the categories you want to password protect.
If you want to use a different password for each category, it's best to use the Password Protected Categories plugin above.
Another difference is that accessing a protected category still shows the post title even before the user enters a password, whereas the password-protected category plugin above hides the title:
![图片[6]-如何用密码保护 WordPress 帖子类别-光子波动网 | WordPress教程、Elementor教程与故障修复](https://www.361sale.com/wp-content/uploads/2024/07/2024073008535587.png)
Link to this article:https://www.361sale.com/en/15067/The article is copyrighted and must be reproduced with attribution.
















![表情[wozuimei]-光子波动网 | WordPress教程、Elementor教程与故障修复](https://www.361sale.com/wp-content/themes/zibll/img/smilies/wozuimei.gif)
![表情[baoquan]-光子波动网 | WordPress教程、Elementor教程与故障修复](https://www.361sale.com/wp-content/themes/zibll/img/smilies/baoquan.gif)

No comments