Problem:
I am trying to create a view where users can filter using BETWEEN in the dates.
Solution:
- You can make custom date field for parametric search and that field needs to be updated when post will be published/updated.
You may use following function/hook for it:
https://codex.wordpress.org/Plugin_API/Action_Reference/save_post
https://codex.wordpress.org/Function_Reference/update_post_meta
- You can add static dropdown in parametric search for months/years and then add date filter to get required results. Here is related ticket and doc:
https://toolset.com/forums/topic/date-range-between-fixed-month-links/
https://toolset.com/documentation/user-guides/date-filters/#filtering-between-dates
https://toolset.com/forums/topic/custom-front-end-filter-for-date-range/
Relevant Documentation:
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 |
---|---|---|---|---|---|---|
- | 12:00 – 17:00 | 12:00 – 17:00 | 12:00 – 17:00 | 12:00 – 17:00 | 12:00 – 17:00 | - |
- | 18:00 – 21:00 | 18:00 – 21:00 | 18:00 – 21:00 | 18:00 – 21:00 | 18:00 – 21:00 | - |
Supporter timezone: Asia/Karachi (GMT+05:00)
This topic contains 2 replies, has 2 voices.
Last updated by 6 years, 10 months ago.
Assisted by: Noman.