Support

Home Forums Event Espresso Premium Event list not sorting by date

Event list not sorting by date

Posted: December 12, 2016 at 7:52 am


rhj4

December 12, 2016 at 7:52 am

My event list keeps sorting the upcoming events in a semi-random way. I want it to appear in date order, so I click on the date, it correctly sorts the events, but when I edit an event and return to the list, they are back in the random order


Josh

  • Support Staff

December 12, 2016 at 12:58 pm

Hi Bob,

They’re actually ordered by ID, descending and there isn’t an option to change the default orderby there.


rhj4

December 12, 2016 at 1:39 pm

There is an “Order” box that contains “0”. When I update this value to “1” and Donna’s to “2” then update, they show in the right order.

When I edit that event again both values are “0”


rhj4

December 13, 2016 at 9:22 am

I have reported two problems. One has to do with ordering of the events in the Overview tab. I would like it to remember my last sorting of the events. Right now they come up in ID order, but I have to immediately sort them into Date order. It would be very helpful if it could simply remember the sort order the next time it generates the list.

The other problem has to do with listing the staff in the event details. This one does have an “Order” box associated with each person, but it forgets the entered value when this form is opened again, thus destroying the order I have created.


Josh

  • Support Staff

December 14, 2016 at 11:58 am

Hi Bob,

Here’s some code you can add to your site that will change the order of the events when you click on the admin menu link to show the events list table:

https://gist.github.com/joshfeck/3ad962e282219f922021ebf55d6d79e2

Since you have another open topic about the People order issue, we’ll follow up there after we take some time to look into that.


rhj4

December 14, 2016 at 12:20 pm

Josh,

Thanks! I got it working very quickly. The instructions on how to create a site-specific plugin were exceptionally useful.

I did have to remove the “&order=desc” to get it to sort in ascending order, but that only took a moment.


Josh

  • Support Staff

December 14, 2016 at 3:07 pm

Hi Bob,

In the future you might want to add back the &order=desc unless you want to see the oldest events first, as that might become cumbersome in a few years.


rhj4

December 14, 2016 at 3:15 pm

If there is a filter that shows only upcoming events, then I won’t need to sort in desc order. Is there such a filter setting?


Josh

  • Support Staff

December 14, 2016 at 4:41 pm

Yes there is, and you can add the following to the end of the URL string in your custom code:

&order=asc&active_status=upcoming


rhj4

December 14, 2016 at 5:20 pm

Thanks again, Josh

The support post ‘Event list not sorting by date’ 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