I have a custom post type that is an Event.
I'm trying to query those Events and only return Events that are in the current month or later. So the event could be in the past, but it has to be in the same month. The event date is a custom field.
So right now I would only want events that were in the month of August or later, and no events prior to August.
Here's my current query, ordered from oldest to newest:
$custom_post_type = 'event'; $args = array( 'post_type' => $custom_post_type, 'post_status' => 'publish', 'meta_key' => 'event_date_and_time', 'orderby' => 'meta_value_num', 'order' => 'ASC', 'posts_per_page' => -1 ); $events = get_posts($args);