Title: query posts AFTER a date
Last modified: August 19, 2016

---

# query posts AFTER a date

 *  [mookster](https://wordpress.org/support/users/mookster/)
 * (@mookster)
 * [18 years, 3 months ago](https://wordpress.org/support/topic/query-posts-after-a-date/)
 * how can i query posts AFTER a date (todays), the >= operator doesn’t seem to 
   work
 * this is what i have
 * <?php $current_day = date(‘d’); ?>
    <?php $current_month = date(‘m’); ?> <?php
   $current_year = date(‘Y’); ?>
 * <?php query_posts(“year>=$current_year&monthnum>=$current_month&day>=$current_day&
   order=ASC”); ?>
    <!– put your loop here –>
 * if i change the operator to = it will return only posts on that date, but the
   above code, which i thought would return posts after a date doesn’t work?
 * NB i am very unfamiliar with PHP although i have a lot of experience on the dark
   side (microsoft/ASP). i am SERIOUSLY impressed with WordPress after only a couple
   of evenings i’ve managed to put together a very versatile CMS for my site.
    The
   reason for wanting posts after todays date is that i’m using an events category
   with the “allow future dates” plugin, i only want to show events that are coming
   up, not those that have passed.

Viewing 1 replies (of 1 total)

 *  [Bangbay Siboliban](https://wordpress.org/support/users/bangbay/)
 * (@bangbay)
 * [17 years, 4 months ago](https://wordpress.org/support/topic/query-posts-after-a-date/#post-711802)
 * Check out the solution on this post:
 * [http://wordpress.org/support/topic/235706](http://wordpress.org/support/topic/235706)

Viewing 1 replies (of 1 total)

The topic ‘query posts AFTER a date’ is closed to new replies.

## Tags

 * [query_posts](https://wordpress.org/support/topic-tag/query_posts/)

 * 1 reply
 * 2 participants
 * Last reply from: [Bangbay Siboliban](https://wordpress.org/support/users/bangbay/)
 * Last activity: [17 years, 4 months ago](https://wordpress.org/support/topic/query-posts-after-a-date/#post-711802)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
