Support

Home Forums Event Espresso Premium Ideas to limit past Events using Recurring Events Dropdown Template?

Ideas to limit past Events using Recurring Events Dropdown Template?

Posted: December 3, 2014 at 12:44 pm

Viewing 2 reply threads


Eric McClintock

December 3, 2014 at 12:44 pm

Wordpress: 4.0.1
EE 3.1.36.6.P with Recurring events plugin & Recurring Events Dropdown Template added

What I’m trying to do: I’m trying to add a Recurring dropdown to a WP page, but its showing me events that have already occurred in the past. Here is the code I’m using:

[EVENT_CUSTOM_VIEW template_name="recurring-dropdown" show_expired="false" use_venue_id="true" venue_id="5"]

I believe that its displaying these expired events because (from what I can tell) the “show_expired” option is based on the Registration Start/End dates, not the Event Start/End dates.

But would there be a way to change this to the event end date without having to have manual registration end dates on each recurring event?


Sidney Harrell

December 3, 2014 at 1:56 pm

Looks like it is controlled by line 176 in plugins/espresso-custom-templates/index.php. Try changing it to:
$sql .= $show_expired == 'false' ? " AND (e.start_date >= '" . date('Y-m-d') . "') " : '';


Eric McClintock

December 3, 2014 at 2:20 pm

That did it, thanks!

Viewing 2 reply threads

The support post ‘Ideas to limit past Events using Recurring Events Dropdown Template?’ 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