Title: Bulk Password Protect Post Types
Author: Bruno Kos
Published: <strong>January 16, 2017</strong>
Last modified: October 28, 2026

---

Search plugins

![](https://ps.w.org/bulk-password-protect-post-types/assets/banner-772x250.png?
rev=1578284)

![](https://s.w.org/plugins/geopattern-icon/bulk-password-protect-post-types.svg)

# Bulk Password Protect Post Types

 By [Bruno Kos](https://profiles.wordpress.org/mckilem/)

[Download](https://downloads.wordpress.org/plugin/bulk-password-protect-post-types.1.2.0.zip)

 * [Details](https://pcm.wordpress.org/plugins/bulk-password-protect-post-types/#description)
 * [Reviews](https://pcm.wordpress.org/plugins/bulk-password-protect-post-types/#reviews)
 *  [Installation](https://pcm.wordpress.org/plugins/bulk-password-protect-post-types/#installation)
 * [Development](https://pcm.wordpress.org/plugins/bulk-password-protect-post-types/#developers)

 [Support](https://wordpress.org/support/plugin/bulk-password-protect-post-types/)

## Description

**Having a problem or a question?** Please write to the [support forum](https://wordpress.org/support/plugin/bulk-password-protect-post-types/)
first. I read it and will try to help you before you leave a review.

Bulk Password Protect Post Types lets you choose one or more post types and set 
one password for every post within them. A visitor sees WordPress’s own password
form instead of the text, on the page, in search results, in feeds and in the REST
API.

#### Features

 * Lists the post types your visitors can see, custom post types included, by the
   names the admin menu uses.
 * One password for all posts of the chosen types, set in one place.
 * Or a password of its own for a post type, when you want different ones.
 * Uses WordPress’s own password protection, so the form and the cookie behave as
   they do for a single protected post.
 * Posts you add later to a chosen type are protected from the first moment.

#### Good to know

 * The password is saved in the site’s database as plain text, as WordPress saves
   the password of a single post. Do not use one you use elsewhere.
 * The password of the setting replaces the password a post had of its own, for 
   the post types you chose. A post type without a password, its own or the general
   one, is left as it is.
 * Nothing is written to the posts themselves. Remove a post type from the setting,
   or deactivate the plugin, and its posts are open again.

## Screenshots

[⌊The settings page.⌉⌊The settings page.⌉[

The settings page.

## Installation

 1. Upload the plugin files to the `/wp-content/plugins/bulk-password-protect-post-
    types` directory, or install the plugin through the WordPress plugins screen directly.
 2. Activate the plugin through the ‘Plugins’ screen in WordPress.
 3. Click Settings, or go to Settings  Bulk Password Protect.
 4. Choose one or more post types and a password, and save.

## FAQ

### Does it change my posts?

No. The password is applied when a post is loaded, and it is never saved to the 
post. Deactivate the plugin and the posts are open again.

### Can I use a different password for each post type?

Yes. Type it in the field next to the post type. A post type without a password 
of its own uses the general password below the list.

### A post type I use is not in the list.

The list shows post types visitors can see (“public” ones). A type that WordPress
or a plugin keeps for itself, such as menu items or reusable blocks, is not offered.
A type you chose with version 1.0 stays in the list.

### How do I leave some posts open, for example one category?

Use the `pass_protect_all_post_password` filter. It gets the password the post would
get and the post, and returns the password to use; an empty string leaves the post
open. Put this in your theme’s `functions.php` or in a small plugin of your own:

    ```
    add_filter( 'pass_protect_all_post_password', function ( $password, $post ) {
        return has_category( 'public-news', $post ) ? '' : $password;
    }, 10, 2 );
    ```

The filter runs for every post, also for post types you did not choose, so it can
protect a single type of post too: return a password for it.

### Does it work on a multisite network?

Yes, each site has its own settings. Deleting the plugin removes the settings of
every site.

## Reviews

There are no reviews for this plugin.

## Contributors & Developers

“Bulk Password Protect Post Types” is open source software. The following people
have contributed to this plugin.

Contributors

 *   [ Bruno Kos ](https://profiles.wordpress.org/mckilem/)

[Translate “Bulk Password Protect Post Types” into your language.](https://translate.wordpress.org/projects/wp-plugins/bulk-password-protect-post-types)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/bulk-password-protect-post-types/),
check out the [SVN repository](https://plugins.svn.wordpress.org/bulk-password-protect-post-types/),
or subscribe to the [development log](https://plugins.trac.wordpress.org/log/bulk-password-protect-post-types/)
by [RSS](https://plugins.trac.wordpress.org/log/bulk-password-protect-post-types/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 1.2.0

 * New: the `pass_protect_all_post_password` filter, to leave some posts open (for
   example a category) or to protect others. The FAQ has an example.

#### 1.1.0

 * New: a post type can have a password of its own.
 * New: the list offers the post types visitors can see, as “Posts (post)”, instead
   of every internal type. A type chosen earlier stays listed.
 * Fixed: deleting the plugin on a network removes the settings of every site, not
   only the main one.
 * Fixed: the settings page ended in a fatal error on PHP 8.
 * Fixed: a chosen post type with an empty password removed the passwords posts 
   had of their own. Now nothing changes until a password is set.
 * Security: the chosen post types and the password are sanitized when saved, and
   everything on the settings page is escaped.
 * The text domain is now `bulk-password-protect-post-types`, the plugin’s slug,
   so wordpress.org translations load.
 * The Settings link on the Plugins screen follows the site’s admin address.
 * Requires WordPress 5.9 and PHP 7.4. Tested with WordPress 5.9, 6.0 and 7.1.
 * Added automated tests.

#### 1.0

 * First stable version

## Meta

 *  Version **1.2.0**
 *  Last updated **3 weeks ago**
 *  Active installations **10+**
 *  WordPress version ** 5.9 or higher **
 *  Tested up to **7.1.4**
 *  PHP version ** 7.4 or higher **
 *  Language
 * [English (US)](https://wordpress.org/plugins/bulk-password-protect-post-types/)
 * Tags
 * [custom post types](https://pcm.wordpress.org/plugins/tags/custom-post-types/)
   [password](https://pcm.wordpress.org/plugins/tags/password/)[post types](https://pcm.wordpress.org/plugins/tags/post-types/)
   [private](https://pcm.wordpress.org/plugins/tags/private/)[protect](https://pcm.wordpress.org/plugins/tags/protect/)
 *  [Advanced View](https://pcm.wordpress.org/plugins/bulk-password-protect-post-types/advanced/)

## Ratings

No reviews have been submitted yet.

[Your review](https://wordpress.org/support/plugin/bulk-password-protect-post-types/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/bulk-password-protect-post-types/reviews/)

## Contributors

 *   [ Bruno Kos ](https://profiles.wordpress.org/mckilem/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/bulk-password-protect-post-types/)