Skip Navigation

[Resolved] How to remove items from a loop based on custom date field

This thread is resolved. Here is a description of the problem and solution.

Problem: I would like to remove items from a View based on a custom date field. Items with a custom date field in the past should not be shown.

Solution: Add a custom field Query Filter to this View to filter by the custom date field. Configure the filter to show posts with custom field value greater than or equal to TODAY.

Relevant Documentation: https://toolset.com/documentation/user-guides/filtering-views-by-custom-fields/

This support ticket is created 6 years, 1 month 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
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

Tagged: 

This topic contains 2 replies, has 2 voices.

Last updated by Seb Gates 6 years, 1 month ago.

Assisted by: Christian Cox.

Author
Posts
#628753
Screen Shot 2018-03-27 at 14.11.48.png

Tell us what you are trying to do? I am trying to remove old time (workshops in the past0 from a loop using a filter.

What is the link to your site? hidden link

It is already displaying by the workshop date (Custom field) - not post date.

There is a filter set up to display an event category called Workshops.

I want to create a secondary filter to remove workshops that have already taken place.

I can't seem to be able to do it.

Please help?

#628956
Screen Shot 2018-03-27 at 4.22.08 PM.png

Okay sure, you will click "Add Filter" and choose your date custom field in the popup dialog. Then you will configure the new filter so that it looks for an "UNSIGNED" value that is "greater than or equal" to "TODAY". Screenshot attached.

#628982

I remember doing this once before successfully but it was a few years ago and I had forgotten. Support was well explained and provided a screenshot. Thanks...

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.