How to Password Protect WordPress Post Categories

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教程与故障修复

However, to set this up, you need the help of a plugin. We recommend two options:

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教程与故障修复

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教程与故障修复

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教程与故障修复

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教程与故障修复

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教程与故障修复

Contact Us
Can't read the tutorial? Contact us for a free answer! Free help for personal, small business sites!
客服微信
Customer Service
Tel: 020-2206-9892
QQ咨询:1025174874
(iii) E-mail: [email protected]
Working hours: Monday to Friday, 9:30-18:30, holidays off
© Reprint statement
This article was written by Harry
THE END
If you like it, support it.
kudos0 share (joys, benefits, privileges etc) with others
commentaries sofa-buying

Please log in to post a comment

    No comments