get posts query display only future events
-
Hi,
I am using gravity forms in combination with events-manager to automatically fill a dropdown list with upcoming events.
I am having a little trouble with showing only the upcoming events because when i query for post-status future it will also display events that have already happened.
The code i am using now is:
$args = array( 'posts_per_page' => -1, 'post_type' => 'event', 'post_status' => 'publish,future', ); $posts = get_posts($args);
I thinks its probably a little more complicated then this….
Hope someone can point me in the right direction?
Thanks,
Wim
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘get posts query display only future events’ is closed to new replies.