Support

Home Forums Event Espresso Premium "Previous" and "Next" arrows point to ID-sorted events, not date-sorted events

"Previous" and "Next" arrows point to ID-sorted events, not date-sorted events

Posted: March 10, 2017 at 9:55 pm


David González

March 10, 2017 at 9:55 pm

Hello everyone. I guess this is a kinda stupid question, but I’ve found no answer so far. I am using latest WP and EE4 versions on a 20-17 template.
Event detail pages feature “previous” and “next” arrows linking to previous and next events. It would be logical to think that “previous” and “next” will show events ordered by date, but it’s not the case. They will point to previously or later events ordered by ID (that is, by creation date at the end), which is completely useless for the website visitor.

I have read that not even tinkering with IDs using phpMyAdmin would solve the problem, as IDs are added some random characters to make sure they are unique. So what can I do? This is important when you sell many events. Thanks.

Example URL: http://bearcarnival.woof.es/events/scenic-tour/


Josh

  • Support Staff

March 13, 2017 at 11:44 am

Hi David,

Those next and previous links are actually added by your WordPress theme, and there is a filter hook that lets you re-order those links. So if you can add some code to the theme’s functions.php file that will re-order the sort of those for you. Here’s a link to a gist that has some example code:

https://gist.github.com/joshfeck/a8e28b9cfecd89308fbea4c152f546c9

The support post ‘"Previous" and "Next" arrows point to ID-sorted events, not date-sorted events’ 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