Support

Home Forums Event Espresso Premium Sort Events List by category-slug not working

Sort Events List by category-slug not working

Posted: March 28, 2016 at 8:55 pm


Jan_McClintock

March 28, 2016 at 8:55 pm

I need to display 11 events in a specific order. After reading through the docs and finding the shortcodes, I tried this:
Each event is assigned to a numbered category. Event1 has category 01-Event1, Event2 has category 02-Event2, etc.

On the event listing page, I’ve used the following shortcode:
[ESPRESSO_EVENTS order_by=category_slug]

Am I misusing this feature or is there an easier way to display the events in a specific order (other than changing the event name to “01-Event” and sorting by name)?

Feeling kinda stupid,
Jan


Lorenzo Orlando Caum

  • Support Staff

March 29, 2016 at 8:57 am

Hi Jan,

Are those events in chronological order? For example, are you wanting them to appear in a specific order because you want your registrants to know the order that they are taking place in?


Lorenzo


Jan_McClintock

March 29, 2016 at 9:18 am

Lorenzo, they are in chronological order right now, which would normally be great. However, some events are packages (5 events together), which we want to appear first on the page, regardless of their dates and times. So, chronological order will not work in this case.


Josh

  • Support Staff

March 29, 2016 at 3:45 pm

Hi Jan,

If you input the events into Event Espresso in the order that you want them to appear (i.e., the first event to be displayed is the first one you add), then you can set the short code to be:

[ESPRESSO_EVENTS order_by=id]

Then it will display them in the order you’ve added them (or their ID).


Jan_McClintock

March 31, 2016 at 1:18 pm

So, there is no way to 1) sort the events by category or 2) change the ID numbers of events already entered?

Why is the [ESPRESSO_EVENTS order_by=category_slug] even offered as a solution if it doesn’t work? Is there no other way to sort the events by category?

Thank you.


Josh

  • Support Staff

March 31, 2016 at 3:48 pm

Hi Jan,

It was a mistake that order_by=category_slug was included as an example.

One way to sort the events by category would be to add a few more shortcodes to the page.

For example:

[ESPRESSO_EVENTS title='My Event List' category_slug=01-Event1]
[ESPRESSO_EVENTS title=' ' category_slug=02-Event2]


Jan_McClintock

March 31, 2016 at 3:54 pm

Thank you, Josh, I appreciate the timely answer!

Jan


Josh

  • Support Staff

March 31, 2016 at 4:17 pm

You’re welcome.

The support post ‘Sort Events List by category-slug not working’ 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