Title: Hide Private / Password Protected Posts
Last modified: January 6, 2019

---

# Hide Private / Password Protected Posts

 *  Resolved [Razorfrog Web Design](https://wordpress.org/support/users/razorfrog/)
 * (@razorfrog)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/hide-private-password-protected-posts/)
 * Possible to easily hide private / password protected posts to avoid a list like
   this? [https://cl.ly/c932e1cf7cd8](https://cl.ly/c932e1cf7cd8)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [Bill Erickson](https://wordpress.org/support/users/billerickson/)
 * (@billerickson)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/hide-private-password-protected-posts/#post-11060068)
 * Private and password protected content are two separate things, so I’ll answer
   them separately.
 * **Private Content**
    Display posts does not show private posts by default (see
   the `'post_status' => 'publish'` default [here](https://github.com/billerickson/display-posts-shortcode/blob/1a573567240dba1639c2ad9dd8ad4399f41fc5bb/display-posts-shortcode.php#L81)).
 * If you create a private page, then use `[display-posts post_type=”page”] to list
   pages, it won’t be included.
 * If you change the shortcode to `[display-posts post_type="page" post_status="
   publish, private"]` it will appear.
 * <strong>Password Protected Content</strong>
    Password protection isn’t a post
   status, but rather an attribute of the post. Default queries include content 
   both with and without passwords.
 * The new version of Display Posts being released today (3.0) includes a parameter
   for this: has_password.
 * `[display-posts]` Displays all posts (with and without a password)
    `[display-
   posts has_password="false"]` Displays posts without a password `[display-posts
   has_password="true"]` Displays posts with a password
 *  Thread Starter [Razorfrog Web Design](https://wordpress.org/support/users/razorfrog/)
 * (@razorfrog)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/hide-private-password-protected-posts/#post-11060970)
 * Thank you! I had meant password protected content, and thew new parameter works.
   However my shortcodes are now only returning 12 posts regardless of the posts_per_page
   parameter – I’ll make a new ticket.
    -  This reply was modified 7 years, 5 months ago by [Razorfrog Web Design](https://wordpress.org/support/users/razorfrog/).

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Hide Private / Password Protected Posts’ is closed to new replies.

 * ![](https://ps.w.org/display-posts-shortcode/assets/icon-256x256.jpg?rev=2940963)
 * [Display Posts - Easy lists, grids, navigation, and more](https://wordpress.org/plugins/display-posts-shortcode/)
 * [Support Threads](https://wordpress.org/support/plugin/display-posts-shortcode/)
 * [Active Topics](https://wordpress.org/support/plugin/display-posts-shortcode/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/display-posts-shortcode/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/display-posts-shortcode/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Razorfrog Web Design](https://wordpress.org/support/users/razorfrog/)
 * Last activity: [7 years, 5 months ago](https://wordpress.org/support/topic/hide-private-password-protected-posts/#post-11060970)
 * Status: resolved