Problem displaying past events past 6.0.1.1 (example provided)
-
We for some time we have used DP Portfolio Posts Pro to display past events. However this stopped working for all Event Calendar versions past 6.0.1.1. Originally I thought it was ALL events, but my test page at https://keastandassociates.com/testing/filterable-blog-tests/ establishes that it is only PAST events. There are 4 events that should show up — and in Divi Builder they DO (image at https://diviplugins.com/wp-content/uploads/dpss/f7bd6a7dda9e304c2bf406a92979add6.png)
but as you can see on the live page outside Builder only the past events show up.To further drill down, Divi Plugin support gave me a snippet of code to insert as short-code:
function dp_test_tec( $atts ) { $args = shortcode_atts( array( 'post_type' => array( 'tribe_events' ), 'orderby' => 'date', 'order' => 'DESC', ), $atts ); $output = ''; $query = new WP_Query( $args ); if ( $query->have_posts() ) { while ( $query->have_posts() ) { $query->the_post(); $output .= get_the_title() . '<br>'; } } wp_reset_postdata(); return $output; } add_shortcode( 'test_tec', 'dp_test_tec' );
The result in both Builder (ref: the screenshot at https://diviplugins.com/wp-content/uploads/dpss/f7bd6a7dda9e304c2bf406a92979add6.png) and live (https://keastandassociates.com/testing/filterable-blog-tests/_ shows that this shortcode only displays FUTURE events.
How can we fix this?
The page I need help with: [log in to see the link]
- The topic ‘Problem displaying past events past 6.0.1.1 (example provided)’ is closed to new replies.