Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Is there a way to display posts, scheduled for the future?

I want to use the published data as an event date and time, which is obviously in the future. I still would like to use these posts for a loop, and for single pages.

share|improve this question

2 Answers 2

    $args = array(
    'post_status' => "future",
    'order_by' => 'date',
    'order' => 'ASC'
     );
$yourLoop = new WP_Query($args);
share|improve this answer

Use

  • 'post_status' => 'draft' to receive all posts that are not published.
  • 'order' => 'DESC' to sort from highest (first) value to the lowest
  • 'orderby' => 'date' to sort by post date

Get

then compare if the post is in the future and - if so - display it.

Maybe there are easier ways to do this, but this is the fastest guide to a solution I could come up with.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.