Support

Home Forums Event Espresso Premium Event table sorting by price

Event table sorting by price

Posted: December 5, 2013 at 7:57 am


Ion Paciu

December 5, 2013 at 7:57 am

Hello,

Is it possible to have the events listed with espresso_table shortcode ordered by price ?

thank you


Josh

  • Support Staff

December 5, 2013 at 11:25 am

Hi there,

It’s not possible out of the box. The order_by parameters that are available for the event list and event table shortcodes are listed here in the documentation:

https://eventespresso.com/wiki/shortcodes-template-variables/#event-list

If you are comfortable with editing PHP files, the template can be edited so the order_by will sort by price. Some examples of the code changes follow:

//before the query
$order_by = $order_by != 'NULL'? " ORDER BY ". $order_by ." ASC " : " ORDER BY ep.event_cost ASC ";

//in the main SELECT query (not the one for the category type)
$sql .= "LEFT JOIN " . EVENTS_PRICES_TABLE . " ep ON ep.event_id = e.id ";

The support post ‘Event table sorting by price’ 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