Skip Navigation

[Resolved] Listing page shows expired events

This support ticket is created 4 years, 9 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+01:00)

This topic contains 5 replies, has 3 voices.

Last updated by AndrewL2119 4 years, 9 months ago.

Assisted by: Nigel.

Author
Posts
#1835611

I have my event listings already built out, but the list displays events that are already over. Is there a way to have these drop off once they are done?

hidden link

#1836201

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Yes - its possible. I'm not sure how you setup your view but we can hook in the query filter for post expiration field to rule out the expired events from your listing.

I will require access details to login to your site and make the necessary adjustment to your view.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I have set the next reply to private which means only you and I have access to it.

#1838903

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+01:00)

Screenshot 2020-11-09 at 13.32.07.png

Hi there

Minesh is sick, let me step in here.

This should be simple enough.

If your posts use a Types date field, you can add a Query Filter to add a condition to the archive query to only retrieve posts where the date is later than today.

You can see an example of that in the screenshot (you add Query Filters in the sidebar in the Loop Selection when you have the archive block selected).

The comparison is as a number because that's how Types date fields are stored (as UNIX timestamps).

I added it to your able-event archive, but it's not working.

I tested on my own local site to confirm that it should be working, and it does, so there seems to be something specifically wrong on your site.

It's possible that some other plugin is interfering in the query, or it could be related to some caching mechanism you have in place.

Can you check—preferably on a staging site—by disabling all plugins except Types and Blocks and switching theme to twentytwenty and visiting the archive to see if it works as expected? If so, it should be possible to identify the source of any conflict by a process of elimination.

#1839311
Screen Shot 2020-11-09 at 2.11.40 PM.png

I was able to get the query working, however something seems to have happened to the page. See attached screenshot. Is there a way to separate the "Event Date" and 'Ascending" dropdowns so that they are on the same line?

hidden link

#1839781

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+01:00)

Screenshot 2020-11-10 at 11.23.14.png

I not sure why but you had added the sorting controls inside a container and grid structure (screenshot) which were saving no purpose, so I moved it out of those and deleted them, and now it is displaying correctly.

If you can confirm that, then please go ahead and mark as resolved.

#1839971

My issue is resolved now. Thank you!