Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pue-sales domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the better-click-to-tweet domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pue-amazon domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pue-stats domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the wordpress-seo domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114
Order by start_time | Event Espresso - Staging Server

Support

Home Forums Event Espresso Premium Order by start_time

Order by start_time

Posted: September 8, 2012 at 5:50 am

Viewing 2 reply threads


Tony White

September 8, 2012 at 5:50 am

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!)


Hope these help someone
Cheers
Tony


Dean

  • Support Staff

September 10, 2012 at 1:09 am

Thanks Tony,

We are looking more into the order by aspect which should be improved in the 3.1.27 release, but I’ll make sure the devs see this post!


Seth Shoultes

  • Support Staff

July 16, 2013 at 1:34 pm

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.

Event Espresso - Staging Server