Support

Home Forums Event Espresso Premium Show expired events on same page as current events

Show expired events on same page as current events

Posted: September 11, 2021 at 8:23 am


SignpostMusic

September 11, 2021 at 8:23 am

I would like to display expired events in a category below the upcoming events on the same page. I would like the ability to use this on multiple pages with multiple categories.
The snippet here only allows me to use show_expired true on specific pages but also disables the ability to show upcoming events on that page.

I’ve tried the plugin here but it throws up a fatal error for line 5 of the shortcode-template.php: Uncaught Error: Call to a member function have_posts() on null

Is there anyway to achieve current and exoired events on the same page using spereate shortcodes?


Tony

  • Support Staff

September 13, 2021 at 8:49 am

Hi there,

We don’t have a shortcode built into Event Espresso to pull only expired events, but the shortcode plugin Josh provided is working for me.

I’ve tried the plugin here but it throws up a fatal error for line 5 of the shortcode-template.php: Uncaught Error: Call to a member function have_posts() on null

How are you calling that template? Using all of the code Josh provided and just with [espresso_past_events] on the page?


SignpostMusic

September 13, 2021 at 2:54 pm

It’s working great now – a slight typo on my end that I didn’t notice.

Thanks


Tony

  • Support Staff

September 14, 2021 at 2:50 am

You’re most welcome, I’m glad you have it working.

The support post ‘Show expired events on same page as current 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