Support

Home Forums Event Espresso Premium Showing Upcoming Event First

Showing Upcoming Event First

Posted: September 27, 2012 at 7:27 pm


erostad

September 27, 2012 at 7:27 pm

What shortcode can I use to show the upcoming event first with all past events showing underneath that one in order of nearest to oldest. I tried changing the shortcodes.php code from ASC to DESC but that no longer works since the update. There was talk about this being a feature in the update. How can I make this change?

Thanks


Jonathan Wilson

September 27, 2012 at 7:35 pm

Hello,

Have you tried the [EVENT_LIST order_by=date(start_date),id] shortcode? You can use “Order By” parameters such as order_by=date(start_date), order_by=date(end_date), order_by=date(registration_start), order_by=date(registration_end).

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


erostad

September 27, 2012 at 7:54 pm

Yeah, I tried that and that shortcode actually doesn’t show anything on the page. I am currently using this code on this page (http://goo.gl/BEHs5)

[EVENT_LIST show_expired="true" show_current="false" order_by="date(end_date)"]


Dean

September 28, 2012 at 1:26 am

Hi,

I was playing around with this, an while I am still going to have a dev look into this in more detail, try this

[EVENT_LIST  order_by=date(end_date) sort="DESC"]

I got my (small) sample data to show upcoming event first http://d.pr/i/Li75


erostad

September 28, 2012 at 4:02 am

Thanks Dean. When I added the code like you have it, nothing showed up. But if I just added the sort=”DESC” part to what I already had, it shows up in the correct order. Here is the full code I am now using:

[EVENT_LIST show_expired="true" show_current="false" order_by="date(end_date)" sort="DESC"]

Thanks!


Dean

September 28, 2012 at 4:03 am

Glad you got it sorted!


Bill Kaczor

October 9, 2012 at 10:17 am

I’m having trouble sorting as well, and none of the above shortcode configurations are working for me.

I’m trying to achieve the following:
– display workshops that are open for registration at top with one shortcode
– display Recent Workshops that are closed below it with its own shortcode, and to exclude all current classes
– The Recent Workshops section should show the most recent first, and descend from there
– Any open classes should be excluded from the Recent Workshops area
– Last challenge: There are several workshops that are recurring events, and I would like the first recurring event in the series to show up but not all of them.

The shortcode I’m currently using is:
[EVENT_LIST show_expired=”true” show_current=”false” show_recurrence=false category_identifier=”adult-workshops-programs-1346210973″ order_by=”date(end_date)” sort=”DESC”]

And you can see what it’s doing and not doing here:
http://www.ancestralknowledge.org/test-for-adult-workshops

The shortcode is currently
– not changing the order
– hiding recurring events completely (is there a way to just show the first event in a series?)
– not excluding open workshops

Any ideas?

The support post ‘Showing Upcoming Event First’ 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