The change you want to make involves making a change to the query. You’ll find the query broken out into parts in the main index.php file of the Custom Templates add-on. One place that will work to change the query is on line 177 where it has this:
$sql .= $show_expired == 'false' ? " AND (e.start_date >= '" . date('Y-m-d') . "' OR e.event_status = 'O' OR e.registration_end >= '" . date('Y-m-d') . "') " : '';
The you make sure to include the show_expired parameter in the shortcode on the page like this:
[EVENT_CUSTOM_VIEW show_expired=false]
Finally, you’ll note that the above change could get wiped out on an update, in the event that Custom Table add-on for EE3 does ever get updated again. It’s not likely it will, but if you know how to use the add_action() and remove_action() WordPress functions, you can unhook the espresso_custom_template_display() function and hook in your own custom function to replace it.
Viewing 2 reply threads
The support post ‘ESPRESSO_TABLE — don't want t oshow events where reg has expired’ 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.
Support forum for Event Espresso 3 and Event Espresso 4.