Forums

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

  1. joaoramos
    Member
    Posted 12 months 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 12 months 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 12 months ago #

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

  4. Triple P
    Member
    Posted 12 months ago #

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

  5. joaoramos
    Member
    Posted 12 months ago #

    It worked. Thanks! :)

Reply

You must log in to post.

About this Topic