Posted: September 23, 2022 at 6:37 pm
Hi! I’m trying to add a page with just a simple list of past events (no image or description) – just the event and date, if possible.
I saw a forum that included a link to this espresso past events shortcode in github – https://gist.github.com/joshfeck/2f8c67a51ebeec117c7dc3a5cb4e0051
That format would be great, except it’s not working for me. Even though I have hundreds of past events, the shortcode [espresso_past_events] is only generating one single event on the page.
Not sure if I did something wrong – I downloaded the zip and uploaded it as a plugin, and then put the shortcode on the page. But again, it just shows one single event.
Is there another solution?
It doesn’t sound like you did anything wrong, I’ve just done exactly the same and got back multiple pages of events (there is a limit of 100 events set on in that code).
Any errors being thrown on the page?
Can you link me to the page you are using the shortcode on?
All I see is a single event (that I believe was a test event in London).
Just to make sure I completed the process right:
1. I went to the github page, and toward the top right, I clicked download zip.
2. I uploaded that zip file to plugins on the site.
3. I built a new page and used the shortcode [espresso_past_events]
4. I tried it in a block, out of a block, standing on my head… and I only see a single event on the published page.
5. I also thought it might be tied into categories, as our events are categorized per city (Atlanta, austin, boston, etc.) But when I added the category info to the shortcode, the page is totally blank
Just adding some notes to this ticket fr future readers.
This issue was caused by using this code:
Which filters out expired events from EE queries.
So the above is querying to pull expired events, whilst the above is hooking into the EE queries to filter out expired events.
To remove those additional filters from that query fixed the expired event list.
The support post ‘Simple list of past 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.