Display Posts can be used to list – or exclude from listing – any content you’ve marked as “Private” or set with a password.
Display Posts does not show private posts by default. It limits results to content with the “publish” status.
If you create a private page, then use
[display-posts post_type=”page”] to list pages, your private page won’t be included.
If you change the shortcode to
[display-posts post_type="page" post_status="publish, private"] it will appear. Here’s a list of all available post statuses.
Password Protected Content
Password protection isn’t a post status, but rather an attribute of the post. Default listings include content with and without passwords.
You can customize the results using the
[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