Home Forums Event Espresso Premium Event list sorting problem with category ID

Event list sorting problem with category ID

Posted: September 24, 2012 at 6:44 pm

Christopher Berry

September 24, 2012 at 6:44 pm

I’m trying to list events in date and time order, restricted to one category. No problem with the category restriction, but the events order themselves by ID. I was having this problem before on the full [ESPRESSO_EVENTS] listing, and removed the “id, ASC” from the end of line 109 of templates/event_list.php. This fixed the problem for the main events listing. Adding the category parameter to an [EVENT_LIST] shortcode brings the problem back, whether order_by=date(start_date) is present or not. Removing the category parameter fixes the problem. Please advise.

The correct sort, using [ESPRESSO_EVENTS], can be found at (but with one extraneous event I need removed).
The incorrect sort, using [EVENT_LIST category_identifier=”tours” order_by=date(start_date)], can be found at

I’ll also add that I tried the solution suggested here: but it simply broke my event page (it returned “No events available.”


September 25, 2012 at 1:48 am

Hi Christopher,

I have tried a non standard shortcode attribute which may work, though my test content was quite limited.

[EVENT_LIST category_identifier=larp order_by=time(start_time)]

theoretically you could have the date and the time one at the same time.

Christopher Berry

September 25, 2012 at 11:10 am

Unfortunately, that shortcode doesn’t seem to work, either in combination with anything or by itself. No matter how I use the time(start_time) shortcode I get back “No events available.”


September 26, 2012 at 1:41 am

Odd it works for me here.

Is it possible to get your login details in order to look into this?

If so, please send them via

Choose the “I am sending login info as requested” option and fill out the form

Christopher Berry

September 26, 2012 at 10:52 am

I’d rather not just at the moment, because we’re actually taking reservations on the events in question and I don’t want to disrupt that if at all possible. Can you let me know where I can find the code regarding the time(start_time) parameter? I upgraded from 3.1.26 to 3.1.27 yesterday and it’s possible that the file with that parameter didn’t get updated.


September 26, 2012 at 11:24 pm

Hi Christopher,

No problem. Date and time functions are processed from event-espresso/includes/functions/time_date.php

The support post ‘Event list sorting problem with category ID’ 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