Support

Home Forums Event Espresso Premium Events need expire on EVENT end date.

Events need expire on EVENT end date.

Posted: December 2, 2012 at 9:41 pm


Mike Mills

December 2, 2012 at 9:41 pm

After many hours searching and wracking my brain I still have not found a solution.

I need to show all events up until todays date.


So far I have gotten to this point:

I have a list of events being shown using the short code:
[EVENT_LIST category_identifier="X" order_by=date(start_date) sort=DESC show_expired=true]

This shows ALL events.

Now I just need to hide all events that have ended via the EVENT end date.

Is it possible to specify this?

Any help would be greatly appreciated.

MORE NOTES:

At the moment, if I remove “show_expired=true” from the short code, all events that have ended via their REGISTRATION end date are no longer visible despite having not even occurred yet via EVENT start/end date.

In Event Espresso > General Settings
The “Events expire on registration end date?” is set to NO.
I have tested with this as YES and as NO and despite using different browsers and clearing cache etc this setting does not seem to make any difference.

I found something that seemed to be a solution but it did not work, perhaps this is due to a newer version of Event Espresso.
See it here at https://eventespresso.com/forums/2011/09/events-to-expire-on-event-end-date-and-not-registration-end-date/


Josh

  • Support Staff

December 5, 2012 at 4:50 pm

Hi Mike,

The simplest way that I can think of to change this would be to uncomment the line where it displays the event in the case of the event being Not_Active.

So in the current version of Event Espresso, the switch case is near the end of /templates/event_list.php, which is this:

switch (event_espresso_get_status($event_id)) {
 case 'NOT_ACTIVE':
    //Don't show the event
    //Uncomment the following two lines to show events that are not active and the active status array
    //print_r( event_espresso_get_is_active($event_id));
    //include('event_list_display.php');
    break;

So what you can do is uncomment that line that tells it to include the event_list_display.php template, so it looks like this:

include('event_list_display.php');

Then you would leave the [EVENT_LIST] shortcode to display the default show_expired=false parameter.


Mike Mills

December 5, 2012 at 11:01 pm

Thank you so much Josh. Worked like a charm.

Amazing something so small as uncommenting a line can fix all my problems.

I am surprised this has not been asked about before though. Perhaps a new release will offer the option to “Expire events via Event-End-Date” instead of using the Registration-End-Date.

Thank you again!

The support post ‘Events need expire on EVENT end date.’ 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