get_posts only returns upcoming events
-
I am using the WordPress get_posts function to return a list of events for display in a custom template:
$args = array( 'posts_per_page' => get_option( 'posts_per_page' ), 'post_type' => 'tribe_events', 'tax_query' => array( array( 'taxonomy' => 'tribe_events_cat', 'field' => 'slug', 'terms' => 'webinars', 'operator' => 'IN' ) ) ); $events = get_posts( $args );
However, this only returns upcoming events. I wish to show all events, including past events. It appears that get_posts is being filtered. How do I disable this filter?
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘get_posts only returns upcoming events’ is closed to new replies.