• Resolved tsalagi

    (@tsalagi)


    I’m using this query_post to display a list of drafts. I would like to display them to only the logged in user. I’ve search high and low for a solution but can’t find anything. It seemed pretty simple at first, at least the idea is simple, but getting it done has proved to be quite difficult.
    code I’m using
    <?php query_posts('&post_type=page&post_status=draft');?>
    Thanks for any help

Viewing 2 replies - 1 through 2 (of 2 total)
  • How about <?php if ( is_user_logged_in() ) query_posts('&post_type=page&post_status=draft'); ?>?

    Thread Starter tsalagi

    (@tsalagi)

    I just slapped myself in the forhead. OUCH! I know it was simple. What a handy little gadget that function is.

    Thanks so much. Love the avatar!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Show drafts to logged in user only’ is closed to new replies.