Home › Forums › Calendar Products › Events Calendar PRO › Show past and upcoming events on the same page
- This topic has 5 replies, 2 voices, and was last updated 10 years, 11 months ago by Jonah.
-
AuthorPosts
-
June 5, 2013 at 6:58 pm #50657wowweedesignParticipant
Hi,
How would I go about showing past and upcoming events on the same page?
We’re using the plugin not only for events but for things such as media releases.
June 6, 2013 at 8:45 am #50716JonahParticipantHi wowweedesign,
Would you want to show this on the Events List page or on a separate page with a custom query?
– Jonah
June 6, 2013 at 4:40 pm #50775wowweedesignParticipantHi Jonah,
On the Events list page and the category list pages too, if you could? Thank you!
June 7, 2013 at 3:45 pm #50834JonahParticipantHi wowweedesign,
Do you want the upcoming and past events separated in any way or do you want the Events List to basically just show all events? I’m wondering where the Events List would start at then? For instance, would you still list with the soonest upcoming event at the top? Or, if you were displaying all past events too, would you display the oldest past event at the top?
– Jonah
June 10, 2013 at 5:14 pm #51000wowweedesignParticipantHi Jonah,
We don’t want them separated at all but if possible would only like to show only 10 events per page. And we would be displaying with the soonest upcoming event at the top but also showing the past events below it.
Thank you!
June 11, 2013 at 12:00 pm #51067JonahParticipantHi wowweedesign,
Unfortunately this is a bit more complicated than we can help out with. You’ll need to setup some custom queries, one to show the soonest upcoming events and one to show past events past a certain point. You can either use WP_Query (here is an example: https://gist.github.com/jo-snips/5112025) or tribe_get_events() (https://theeventscalendar.com/support/documentation/the-events-calendar-template-tags-general-functions/#functiontribe_get_events) to run your queries and you’ll want to put those custom queries in page templates or something like that.
I hope that helps and sorry I can’t offer up anything else here.
– Jonah
-
AuthorPosts
- The topic ‘Show past and upcoming events on the same page’ is closed to new replies.