I have been using the shortcode
[ESPRESSO_EVENTS_TABLE_TEMPLATE order_by=start_date category_slug=virtual-workshop category_filter=false table_search=false show_expired=false]
to display all upcoming events in ascending order of starting date.
It is not working, and I have tried various alternatives with no luck – it seems to default to using the post id to sort on.
I happened to add a 2nd table on the same page, and it DID order correctly. Ditto with a 3rd or 4th table.
At first I though this bizarre, but now I suspect there is some kind of script loading that happens with the first table that allows the sorting to work on all the other tables.
Any help much appreciated.
Thanks
Kris
The short code for each table is the same:
[ESPRESSO_EVENTS_TABLE_TEMPLATE order_by=start_date category_slug=virtual-workshop category_filter=false table_search=false show_expired=false]
Apologies for the delay, I spent some time looking into this but I can’t reproduce it.
Single and multiple instances of the table view template are sorted as expected for me. The order_by=start_date part of the shortcode is passed directly to the query and sets the order returned by the query itself, the JS can then manipulate from there but even if I load the page with JS disabled I get the same results.
Strange!
In terms of the order of the event, does anything change it you remove the category parameter? So remove this from the first shortcode – category_slug=virtual-workshop
Viewing 5 reply threads
The support post ‘Table template order by (start date) not working’ 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.