I have the upcoming events list setup but it is not ordering the events in the proper order. It is only ordering them by the start date, but not the start time, which displays 7pm events before 10am events and causes confusion for site visitors.
What should I modify in the following code from widget.php to also add the time variable into consideration: $order_by = " ORDER BY date(start_date), id ASC ";
Also, is there anyway to exclude items where the registration has been closed, or events that have passed on the current day. I only want to display upcoming events.
This topic was modified 11 years, 5 months ago by Mary Clare Bland.
You can modify the code to include the start time:
$order_by = " ORDER BY date(start_date), ese.start_time, id ASC ";
The widget settings has an option that can be set to “No” for “Show Expired Events”
Viewing 1 reply thread
The support post ‘Events List Widget – Orderby start_date AND START_TIME, events are out of order!’ 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.