Problem A: I also found that multiple events on the same day would not always appear in the correct order, ie events starting at 4pm would appear before events starting at 9am.
Solution: Edit template/event_list.php and add ‘ORDER BY date(start_date) + start_time’ as below
$sql .= $order_by != ‘NULL’ ? ” ORDER BY ” . $order_by . ” ASC ” : ” ORDER BY date(start_date) + start_time, id ASC “;
This will ensure that events appear in the time order even if created after the later events.
Problem B: I have noticed that when you use events events that have multiple times the dropdown list it does not order the list correctly… instead of having the 8am session first the 1pm session was showing.
Solution: Edit the indcludes/functions/time_date.php and on line 176 add –
‘order by start_time’ to the sql query (as below)
$sql = “SELECT * FROM ” . EVENTS_START_END_TABLE . ” WHERE event_id='” . $event_id . “‘ order by start_time”;
This change will be overwritten on update (unless it is changed, please!)
Thanks again Tony! This will actually be added to 3.1.36.
Viewing 2 reply threads
The support post ‘Order by start_time’ 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.