Support

Home Forums Event Espresso Premium Stop showing event once registration is closed

Stop showing event once registration is closed

Posted: December 1, 2015 at 1:17 pm


Chris Ike

December 1, 2015 at 1:17 pm

Hello,
Was looking for a solution to have events whose registration is over, but are still upcoming, not show up in the event list or upcoming event widget. Found this existing thread that seemed to be dealing with the same issue and there was an apparent fix via a filter hook that would address the problem, but the thread was closed and I didn’t see the resulting code or how to implement.

Here’s the ticket I am referring to:
https://eventespresso.com/topic/expired-events-showing-in-sidebar-upcoming-events-widget/

Would love to see if the solution was developed or something similar that would allow events whose registration window has past to be hidden in the main event lists.

Thanks!


Garth

  • Support Staff

December 1, 2015 at 2:17 pm

ON the event list page you can use the expired parameter:

show_expired="false"

Would that help?

Source: https://eventespresso.com/wiki/ee4-shortcodes-template-variables/


Chris Ike

December 1, 2015 at 2:55 pm

Hi Garth, thanks for the quick reply. Would that filter out the events based on when the tickets availability ends? I was under the impression that the show_expired=”false” variable was associated with the event’s actual end date.

Thanks.


Lorenzo Orlando Caum

  • Support Staff

December 1, 2015 at 3:16 pm

Hi Chris,

That specific support post was for hiding expired events from the upcoming events widget and that is in progress.

The events listing page (e.g. example.com/events/) will show expired events and there is a way to exclude expired events.

You can see the sample code snippet here which can be added to to your child theme’s functions.php file or a site specific plugin:

https://github.com/eventespresso/ee-code-snippet-library/blob/master/templates/de_ee_filter_events_out_with_expired_tickets.php


Lorenzo


Chris Ike

December 1, 2015 at 3:46 pm

This sounds promising. I’ll give it a shot. Thanks Lorenzo!


Garth

  • Support Staff

December 1, 2015 at 7:53 pm

Great. Let us know if we can do anything else for you.

The support post ‘Stop showing event once registration is closed’ 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