Support » Plugin: Display Posts - Easy lists, grids, navigation, and more » Hide Private / Password Protected Posts

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Bill Erickson


    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).

    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

    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.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Hide Private / Password Protected Posts’ is closed to new replies.