Support

Home Forums Event Espresso Premium How to hide past events on the My Events shortcode Reply To: How to hide past events on the My Events shortcode

Reply To: How to hide past events on the My Events shortcode

Author Replies
SupercarDriver # Posted on May 8, 2018 at 6:46 am

Hi, thanks for the reply,

When I went to edit the file it was already there yet members cannot see those changes applied (ie. they still see old events) I have cleared server cache and browser cache so works for me but can’t get 700 users to clear their own cache? any advice?

there was also another piece of code in there:

if ( $event->get_active_status() == 'DTI' ) { return; }

I have removed that and replaced so the start of the file now looks like this:

<?php
if ( $event->get_active_status() == 'DTE' ) { return; } // removes expired events
/**
 * Template for the "event_section" content template for the [ESPRESSO_MY_EVENTS] shortcode
 * Available template args:
 *
 * @type    EE_Event $event              event object
 * @type    string   $your_tickets_title title for the ticket.
 * @type    int      $att_id             The id of the EE_Attendee related to the displayed data.
 */

$registrations = $event->get_many_related('Registration', array(array('ATT_ID' => $att_id)));
?>
Do NOT follow this link or you will be banned from the site!