WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] How to show private posts to logged on users? (5 posts)

  1. joaoramos
    Member
    Posted 2 years ago #

    I'd like to see my private posts before they're published. Is there any *easy* way of doing that on this loop?

  2. Triple P
    Member
    Posted 2 years ago #

    You can add the post status parameter:

    <?php query_posts('category_name=work&posts_per_page=10&post_status=private'); ?>

  3. joaoramos
    Member
    Posted 2 years ago #

    Won't that stop showing all the non-private posts as well?

  4. Triple P
    Member
    Posted 2 years ago #

    You can use an array to include multiple post statuses, see query_posts

  5. joaoramos
    Member
    Posted 2 years ago #

    It worked. Thanks! :)

Topic Closed

This topic has been closed to new replies.

About this Topic