Forum

Thread tagged as: Question, Events

Past Events

Hi there

Getting feedback from people finding old events on the website - I guess via Google and getting confused with the year, e.g. seeing the 2014 event instead of the 2016 event.

I don't really want to delete all old events as it'll take ages. Is there a way it could automatically have a 'THIS IS AN ARCHIVED EVENT' below the Event Title... would this be the best way to do it? I guess it would need to work with the PostDateTime?

Any feedback would be well received.

Rich

Rich Hemery

Rich Hemery 0 points

  • 5 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Pass in the current date from your page:

PerchSystem::set_var('current_date', date('Y-m-d H:i:s'));
perch_events_custom(...);

and then in your template:

<perch:if id="eventDateTime" match="lt" value="{current_date}">
    This is an archived event.
</perch:if>

Thanks Drew, think this is the first time ever I've tried something and it's worked first time, I was in shock.

https://www.lovebedford.co.uk/events/event.php?event=2016-07-24-love-bedford-day

:-D