Show Posts By Custom Date After Today
-
Hey Guys,
So Im working on showing posts based on a custom field date set for each post. The custom date is in the format (YYYYMMDD) e.g. 20160105. Ive gotten close but for some reason I can only get the events with the dates on the day to display rather than that and future date. Here is my code:
$args = array('post_type' => 'ts_post', 'numberposts' => '7', 'meta_key' => 'CloseDate', 'post_status' => 'publish', 'orderby' => 'meta_value', 'order' => 'ASC', 'meta_query' => array( array('value' => $dateToday, 'comapre' => '>=', 'type' => 'DATE')),);
$dateToday
is set asdate('Ymd')
Thanks
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Show Posts By Custom Date After Today’ is closed to new replies.