Problem:
Client has start date and end date custom fields. In a custom search View they have added filters for the begin and end dates, but would like posts to be included in the results if any part of its dates overlap with the filter start and end dates.
Solution:
The trick is to compare the start date from the filter with the end date of the post, and the end date from the filter with the start date of the post.
Insert filters for the start and end dates. In the Query Filter section (you may need to use the Screen Options tab at the very top of the page to expose it) edit the filters to swap the URL parameters used by the two filters, and to make it so the the start AND end filters must be true.
Relevant Documentation:
https://toolset.com/documentation/user-guides/filtering-views-query-by-date/
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.
Heute stehen keine Supporter zur Arbeit im Werkzeugsatz-Forum zur Verfügung. Sie können gern Tickets erstellen, die wir bearbeiten werden, sobald wir online sind. Vielen Dank für Ihr Verständnis.
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)
Dieses Thema enthält 3 Antworten, hat 2 Stimmen.
Zuletzt aktualisiert von marcov-3 vor 6 Jahre, 5 Monate.
Assistiert von: Nigel.