Home › Forums › Calendar Products › Events Calendar PRO › Still display events that have passed
- This topic has 9 replies, 3 voices, and was last updated 11 years, 8 months ago by
Casey D.
-
AuthorPosts
-
July 9, 2014 at 8:19 am #322014
kinddesign
ParticipantHi there,
I’m using the plugin to manage a book Festival which runs over 10 days, with about 15 events per day.
When the Festival is in progress, I would like all the events for each day to still appear in List & Photo view, even though they might need to be shown as ‘This Event has passed’, so that users can still see the structure of the Festival & what has happened. As at the moment, events that have passed are not shown in these views, as the Festival progresses the site will start to dwindle to showing very little at all, which could be a bit misleading for what actually happens at the Festival each year!
Is this something easy to accomplish? Hopefully it would be a useful feature for others? The expired events are still accessible via other methods, such as searching & using ‘previous’ links, but it would be great to be able to show them in the main views.
Hope you can help!
Mat
July 9, 2014 at 10:49 am #322951Casey D
MemberHello kinddesign,
I believe the url /events/past is what you are looking for. If you were to add that to your menu, or another query that displayed exactly what you wanted (instead of just /events), you could then show all the events of the festival.
Does this make sense? Let me know if this doesn’t work for you.
Cheers!
– Casey Driscoll
July 10, 2014 at 1:01 am #331322kinddesign
ParticipantHi Casey,
Thanks for that, adding /past/ does indeed work to show past events. It is showing just past events though obviously, but are you saying there might be a query string I could add to show both? Do you have any suggestions,on that, as I’m not too comfortable with them!?
Also, as this will be the most promoted URL of the Festival, as it is essentially the schedule/lineup, I’d hope to avoid having it look too messy or misleading. Having ‘past’ in there for example would look a little janky?
I’m already using template overrides for list.php, could I modify the loop in any way?
Thanks again for the help!
Mat
July 13, 2014 at 11:48 am #367140Casey D
MemberHello kinddesign,
This is a really great use of our plugin by the way. If it is alright with you we will put it in our showcase.
Sorry I feel like I gave you an incomplete answer yesterday. (/past would certainly work, but not really what you are looking for)
Just typing this out loud, I think you have everything you are looking for already. *Mostly*
Each ‘Day’ view will show all events of that day, even if they have expired. In the day/single-event view, you could probably easily make a flag for when the event has already passed, by calculating the event’s time to the current time.
The main /events and /events/photo are the two pages you’ll want to change it seems, as you’ve already stated. (For my money, I would leave the functionality as-is. If I’m a visitor coming to the event while it is in process, seeing past events is nice, but I really want to immediately see what is upcoming, as that is the actionable item)
This should be relatively easy to do, as you just have to change the query of events to include past events for a certain time frame. I believe there is a action or filter hook in place to change the query, but I’m not sure which one off hand. I will ask around and see if anyone can help pin point the code for this.
Then of course you can just use a flag like above to highlight the already passed events.
Does this make sense? Let me know if I can explain anything else!
Cheers!
– Casey Driscoll
July 13, 2014 at 11:49 am #367142Casey D
MemberAlso just a heads up, I should be able to assist with your temp site down, but it is much easier with it up! 🙂
– Casey Driscoll
July 14, 2014 at 9:25 am #380316kinddesign
ParticipantHi Casey,
The site is now live under the following URL, although we are blocking ticket sales to non-members until this Friday (18th July).
http://www.appledorebookfetsival.co.uk
I can send you a guest login if you like though?!
Would be great to be featured as a showcase site although the Event listings only show for about 5 months of the year for this site.
I did just stumble across this thread:
Continue displaying events until after they're over (or have been over a week)
Where they seem to be trying to do similar to myself? Do you think that loop query might work for us? Also, I did think it might be a case of querying events times, but what would be the best way to access & query the event timestamps?
Cheers!
Mat
July 14, 2014 at 9:27 am #380323kinddesign
Participanttypo on the URL there!
July 15, 2014 at 9:46 am #395659Casey D
MemberHello kinddesign,
That forum thread looks like it does what you are looking for. Barry also made up this gist for general query tweaking. https://gist.github.com/caseypatrickdriscoll/45acdda5a7b3de558941
Every event has a ‘_EventStartDate’ and end date in the wp_postmeta table.
Does this make sense? Let me know if this doesn’t work for you.
Cheers!
– Casey Driscoll
July 16, 2014 at 11:33 am #413920aling
ParticipantJust wanted to say thank you Casey for giving me an idea. I was able to add to my existing code so that on our homepage, any event end date/time that is < current date/time will fall off. Now I do not have to work on weekends! lol.
August 11, 2014 at 10:05 am #640305Casey D
MemberHello kinddesign,
Happy it worked out!
We’d love it if you would leave us a review and let people know how much you like the plugin! http://m.tri.be/jt
I’ll go ahead and close this thread. Let us know if we can help with anything else.
– Casey Driscoll
-
AuthorPosts
- The topic ‘Still display events that have passed’ is closed to new replies.
