How to query_posts after the current timestamp and sort reverse chronologically?
Posted
by
Jody Heavener
on Stack Overflow
See other posts from Stack Overflow
or by Jody Heavener
Published on 2013-10-19T21:10:41Z
Indexed on
2013/10/19
21:55 UTC
Read the original article
Hit count: 250
I am using the following code in Wordpress to query events (custom post type) and order them by date chronologically..
query_posts( array( 'post_type' => 'events', 'showposts' => 10, 'orderby' => 'meta_value_num','meta_key' => '_ecmb_datetime' ) );
Where the meta key _ecmb_datetime
is, this is the timestamp of the event.
I don't want to show events that have already happened, so my question is how do I only show events happening after my current time, and how do I sort reverse chronologically?
Any help is greatly appreciated
© Stack Overflow or respective owner