Posted: December 16, 2020 at 9:40 am
For the list of events that appears on a person’s detail page, I’d like to only show upcoming events, not past events. I think I had this working at one point but it looks like my content-espresso_people-details.php might have been based on an old version or something. It’s not sorting correctly and is including some past events. Here’s what I have for content-espresso_people-details.php (I also added the event start date to the list): $where = array( <?php endforeach; ?> </div> |
|
When you say ‘some’ expired events, are those events that have the datetime END date after today? This where condition:
Is setting the query to pull Events where the Event END date has not passed yet, if you want only upcoming events use:
|
|
Ok, that makes sense. With that change I’m still not getting the behavior that I want but I see what it’s doing now. The events have multiple datetimes and it’s showing any event that has an upcoming datetime. I would like to only show events where the FIRST datetime is upcoming. Any event where the first datetime has passed should not be listed at all. |
|
The support post ‘People Add-On – only show upcoming 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.