Last active
August 29, 2015 14:26
-
-
Save thoronas/39c9b8a9ac4cc355976f to your computer and use it in GitHub Desktop.
WP Query for events posts with upcoming dates
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$current_date = date(Ymd); | |
$event_args = array( | |
'post_type' => 'event_post_type', | |
'meta_query' => array( | |
array( | |
'key' => 'date_field', | |
'value' => $current_date, | |
'compare' => '>=' | |
) | |
), | |
); | |
$events = new WP_Query( $event_args ); | |
// do query loop stuff | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is the current code for the field in the tab that gets both past-dated 'upcoming_speaking_engagements' and also 'speaking_engagements' supplied from a separate field:
I also have to style upcoming_speaking_engagements date separately in the circles below on the page http://ekbdev.wpengine.com/people/angelina-folino/
Not sure how to integrate the query.