Support

Home Forums Event Espresso Premium Help creating two lists of events

Help creating two lists of events

Posted: June 9, 2017 at 1:19 pm

Viewing 1 reply thread


altosagency

June 9, 2017 at 1:19 pm

I want to create two event lists.

One shows upcoming events. Should be sorted so that the next event (one coming up soonest) is first. Ones that happen farther out in the calendar year are pushed down. This would be for the url /events.

The other list should be for expired events. We would like to call it “Past events” and only show expired events. But with the more recently ended events at the top. This would be for the URL /past-events.

We’ve built this site using the HTML Blank start template and I have successfully leveraged many files from your wp-content/plugins/event-espresso-core-reg/public/Espresso_Arabica_2014 to control the styling of /events.

I can see the loop-espresso_events.php looping through and outputting each event, but am unsure how to limit it to only upcoming events. I am using the supplied archive-espresso_events.php which calls espresso_get_template_part( ‘loop’, ‘espresso_events’ );. I feel this area could sovle #1 list, but don’t know what I could put there.

WordPress Version: 4.8
PHP Version: 5.6.30
MySQL Version: 5.6.36
Event Espresso Version: 4.9.40.p


Josh

  • Support Staff

June 9, 2017 at 2:25 pm

You can publish a page with the [ESPRESSO_EVENTS] shortcode included into the content for #1.

For the other list of expired events, you can build a page template like either of these examples:

https://gist.github.com/joshfeck/61a9e21bbc9d4111fbdf
https://gist.github.com/joshfeck/56bc9e4a3683779fe90f

Viewing 1 reply thread

The support post ‘Help creating two lists of 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