Get future events
-
Is this possible?
Typically, if I needed to get events from the future, where the event date was post meta, I would use a meta query like so:
'meta_query' => array( array( 'key' => '{meta_field}', 'value' => date( 'Y-m-d', time() ), 'compare' => '>', 'type' => 'DATE', ), ),
The thing is, according to the codex:
The ‘type’ DATE works with the ‘compare’ value BETWEEN only if the date is stored at the format YYYY-MM-DD and tested with this format.
So, is there any a preferred way you know of to perform a query to get your events that appear in the future?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Get future events’ is closed to new replies.