Support

Home Forums Event Espresso Premium Order of events by time

Order of events by time

Posted: December 29, 2013 at 10:06 pm

Viewing 4 reply threads


James Weissman

December 29, 2013 at 10:06 pm

Hello…

I am just starting to use EE with a business license and cannot figure out how to sort events on my page according to the event time and I cannot find the exact answer by searching other posts.

I am actually setting up classes for two different rooms at my studio. So each room has a different page.

I have also organized categories for each room/page.

That works fine but on each page, while it is listing the correct classes in order of date…within each date they are not listed in order of times.

For example on Wednesdays I have a 12p, 5pm and 6:30pm class. But they are listed in the following order: 5pm, 6:30pm and 12pm

I thought I found the answer in another thread where the instructions said to use this code in the page editor:
[EVENT_LIST order_by=date(start_date),start_time sort=ASC]

However that is not working. It appears to clash with the code on that page for the category which corresponds to that page/class.

Any advice?

I’ve also tried adding [EVENT_LIST order_by=date(start_date),start_time sort=ASC] to the editor on the category page and that didn’t work either.

For reference, here is one of the pages showing my problem:
http://empowermentthroughexoticdance.com/wp/class-registration/event-registration/

Thank you!


Dean

December 30, 2013 at 4:54 am

Hi James,

Sorry for the bother here, we have found this to be an issue and currently have an active ticket open to look into this and fix it. Once done it will be released into the next available release.


James Weissman

December 30, 2013 at 12:56 pm

Thanks Dean. I will watch for that.

In the mean time, is there some formula to what order the events appear on the page? I don’t want to have to rebuild all the events but it may be worth it if I can get them in order of time manually?

Does their order of appearance have anything to do with the order they are created in?


Josh

  • Support Staff

December 30, 2013 at 3:23 pm

Hi James,

They can, the event’s ID can be used as a parameter in the order_by part of the shortcode. So as an example this:

[EVENT_LIST order_by=date(start_date),id]

Will order the events first by date, then if the date matches, by ID. You can also do:

[EVENT_LIST order_by=date(start_date),event_name]

so if the event time is included in the event name that may help in this case.

Alternatively, the events table template (included with the Custom Templates add-on will order the events by time by default:

https://eventespresso.com/wiki/custom-template-add-on/#eventstable


Sidney Harrell

December 30, 2013 at 4:03 pm

It should actually be:

[EVENT_LIST order_by=DATE(start_date),TIME(start_time) sort=ASC]

since the start_time in the database in in 8:00 am or 5:00 pm as a string, if you don’t put in the time function, then 5:00 pm would come before 8:00 am. If you also want the category, then you would include that in the event list shortcode attributes:

[EVENT_LIST order_by=DATE(start_date),TIME(start_time) sort=ASC event_category_id=ping-pong-1386190142]


James Weissman

December 30, 2013 at 4:44 pm

Thanks everyone!

Sidney that last one did it! Thank you!

Viewing 4 reply threads

The support post ‘Order of events by 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