Thread tagged as: Question, Problem, Events

Past events continue to appear

Past events are not shown by default, to my knowledge. On a site I'm doing some maintenance for, there's a listing of upcoming events on the homepage using this array:

            $opts = array(


The past events are showing, which is confusing the site's visitors. Here's the template for that area:

    <h5><span class="day"><perch:events id="eventDateTime" format="l, jS F Y" /></span></h5>
    <span class="time dtstart"><span class="value-title" title="<perch:events id="eventDateTime" format="c" />">   <perch:events id="eventDateTime" format="%l:%M %p" /></span> - </span>
    <span class="event summary <perch:events id="category_slugs" />"><a href="<perch:events id="eventURL" />"><perch:events id="eventTitle" /></a></span>
                <div class="description">
                    <perch:events id="eventDescHTML" encode="false" />


What's going on with it?

Gary Iverson

Gary Iverson 0 points

  • 7 years ago
Rachel Andrew

Rachel Andrew 394 points
Perch Support

the past-events filter is for the standard functions. You are using perch_events_custom so will need to filter what you show yourself (as is usual for any custom function). The docs are here:

You need to filter it via the date. i.e

$opts = array(

Ah. So to make sure I'm understanding this properly, the above array will filter the events listing to include events that take place on a day that is either today or in future, correct?

Drew McLellan

Drew McLellan 2638 points
Perch Support

That's right.