Support

Home Forums Event Espresso Premium Upcoming Events not displaying on venues archive page

Upcoming Events not displaying on venues archive page

Posted: October 4, 2018 at 3:35 pm

Viewing 2 reply threads


Smartycat1

October 4, 2018 at 3:35 pm

I have a problem for our venues archive page. Logged in, you can see the 3 upcoming events, but in private browser window the events do not display. We have an hook / add action in fuctions.php but no changes have been made so we don’t know why it’s not working all of a sudden. And then actually it started working all of a sudden and we didn’t make any changes? What might have caused this and what should I look for to make sure it won’t happen again?

https://www.smartycatkids.com/venues/colonia-nj/ should display 3 events and

https://www.smartycatkids.com/venues/westfield-nj/ should display 1 event.

Thanks, I look forward to any information you can provide. Cheers,

//Event Espresso Locations (aka Venues) Customization
function ee_list_upcoming_events_for_a_venue( $post ) {
// query the events for this venue using EE_Venue’s events() method
$query_params = array(
‘order_by’ => ‘Datetime.DTT_EVT_start’,
‘order’ => ‘ASC’,
array(
‘status’ => ‘publish’,
‘Datetime.DTT_EVT_start’ => array(
‘>’,
date( current_time( ‘mysql’ ) ),
‘Datetime.DTT_EVT_end’ => array(
‘<‘,
date( current_time( ‘mysql’ ) )
)
)
)
);
$events = EEH_Venue_View::get_venue( $post->ID )->events( $query_params );
// start the output
echo ‘<h3>Upcoming events at this venue</h3>

‘;
// end the output
}

// next, add the above to an action found in the venue template

add_action( ‘AHEE__content_espresso_venues_details_template__after_the_content’, ‘ee_list_upcoming_events_for_a_venue’ );


Josh

  • Support Staff

October 4, 2018 at 5:41 pm

Hi,

I checked your site, and this is probably the reason why they’ll display, then not display, then display again:

Performance optimized by W3 Total Cache. Learn more: https://www.w3-edge.com/products/

Object Caching 138/400 objects using disk
Page Caching using disk: enhanced 
Minified using disk

Served from: www.smartycatkids.com @ 2018-10-04 19:25:09 by W3 Total Cache

If you see this happen again you could clear the caching plugin’s cache to force it to rebuild. In order to prevent it from happening again you could switch to use the WP Super Cache plugin, which has simpler settings.


Smartycat1

October 4, 2018 at 11:35 pm

Oh, excellent information and assessment, Josh. Really appreciate it. We will clear the caching plugin’s cache for sure and consider your suggestion for WP Super Cache as well. Thanks again!

Viewing 2 reply threads

The support post ‘Upcoming Events not displaying on venues archive page’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso