I am using the shortcode in the page content like [ESPRESSO_EVENTS_TABLE_TEMPLATE show_expired=false table_style=metro order_by=start_date sort=DESC table_pages = 20]
How can I get the Spaces Remaining column back?
Thanks,
The Events Table output does not (nor has ever) include a spaces remaining column in the official template, so to load that column you must have been using a custom template.
Did you update the theme at the same time?
There’s a few locations that template could of been loading from:
Theme – usually within your theme’s root directory.
/wp-content/uploads/espresso/ – template files can load from this location although we advise using a child theme over this now.
The template within the add-on itself was modified and you’ve since updated the add-on (which wipes out any customizations).
Check the above 2 locations for espresso-events-table-template.template.php to see if the file is there an just not loading, but if was stored in the theme and you’ve updated the theme it will no longer be there.
Hi Tony,
No the theme was not updated, and we use a child theme anyway. So I looked in the uploads/espresso/ folder and found a file espresso-events-table-template.template.php. In it there is code: <table id="ee_filter_table" class="espresso-table footable table" data-page-size="<?php echo $table_pages; ?>" data-filter="#filter">
<thead class="espresso-table-header-row">
<tr>
<th class="th-group"><?php _e('Event','event_espresso'); ?></th>
<th class="th-group"><?php _e('Venue','event_espresso'); ?></th>
<th class="th-group"><?php _e('Spaces Remaining','event_espresso'); ?></th>
<th class="th-group"><?php _e('Date','event_espresso'); ?></th>
<th class="th-group" data-sort-ignore="true"></th>
</tr>
</thead>
This file is dated from 2020, so did not change recently. Does something need to change around the $total_spaces_left variable to work with the updated EE plugin?
There is also a file named espresso-events-table-template-toggle.template.php in this same folder. Not sure if that is relevant.
No, looks like this is a bug in our locate_template function within core (used by add-ons to locate custom templates).
/wp-content/uploads/espresso/ is a deprecated location, but the order is currently incorrect, so it’s basically ignored.
Pull both of those files into your child theme’s root directory and they should start loading again.
I’ll create a ticket to ‘fix’ the method within core, however, /wp-content/uploads/espresso/ will throw a deprecation notice each time it loads a template from it, so switching to load within your child theme now will prevent that from happening.