Charles Callender
December 21, 2015 at 1:04 pm
Using this shortcode does not hide expired events.
[ESPRESSO_EVENTS category_slug=”mondays” show_expired=”false”].
The events in question are over and registration is closed.
Please advise!
Thank you,
Kindra
Josh
December 21, 2015 at 1:51 pm
Add New Note to this Reply
Hi Kindra,
The first thing to do here is remove the quotes from the shortcode parameters, eg:
[ESPRESSO_EVENTS category_slug=mondays show_expired=false]
If the above change does not make a difference, can you post a link to the page using the shortcode so we can investigate further?
Josh
December 21, 2015 at 1:54 pm
Add New Note to this Reply
Further to the above, the default setting for the shortcode is show_expired=false. So you should be able to just use:
[ESPRESSO_EVENTS category_slug=mondays]
Charles Callender
December 21, 2015 at 2:35 pm
Add New Note to this Reply
Hey Josh, the page was originally set to just the category_slug, I added the expires option to see if that would help. I just stripped it back to:
[ESPRESSO_EVENTS category_slug=mondays]
[ESPRESSO_EVENTS category_slug=tuesdays]
[ESPRESSO_EVENTS category_slug=wednesdays]
[ESPRESSO_EVENTS category_slug=thursdays]
And the page is still showing expired events: https://connectionscounseling.com/choices-about-alcohol-schedule/
Any idea what could be happening?
Thank you,
K
Charles Callender
December 21, 2015 at 2:37 pm
Add New Note to this Reply
Oh! I see now, some of the events don’t have tickets, but are still happening in the future. Any way to display events with open registrations only?
Josh
December 21, 2015 at 3:23 pm
Add New Note to this Reply
You can add this code from our snippet library to your site:
https://github.com/eventespresso/ee-code-snippet-library/blob/master/templates/de_ee_filter_events_out_with_expired_tickets.php
What it will do is filter out any events that are past the date of the ticket sale end date.
Charles Callender
December 21, 2015 at 7:45 pm
Add New Note to this Reply
Thanks Josh, you rock!