Looking for support? You can access the support system via your account.
- This topic has 12 replies, 2 voices, and was last updated 4 years, 2 months ago by .
The topic ‘Date range filter with Post meta’ is closed to new replies.
Looking for support? You can access the support system via your account.
Forums › Forums › Search & Filter Pro › Date range filter with Post meta
Tagged: acf, custom field, custom post type, date range, post meta
Hi,
I’m building a website, that has events. I would like to make a search form, where users can select the from and to date, and the site lists the events that are in the date range that the user set.
I have the custom post type, called Events, and two custom date field (from date and to date), where I can set the event’s start date and end date in the admin.
I’ve satertd to build the search form, using the Date post element, and I have tried to set the Post meta condition, but honestly, I don’t know what to do with them.
Could you help me please?
I have read your documentation, but I couldn’t find any steps about this.
Thank you,
I’ve just solved it, but I have an other problem, the two meta field have an AND relationship, bit I would like to set it to OR. I have changed the Field relationships to OR, but it does not work. When I search I got nothing found message 🙁 It shows the results only if I set the correct date for all the date fields.
Please help me,
Thank you
One more very important thing: If I set the event start date to 2020. jan 1. and the end date 2020. feb 4., and the user in the search field set the 2020. jan 12. start date and 2020. jan 18 end date, she/he has to get the event mentioned above.
How can I set this?
Thank you,
Please see this screenshot:
https://www.screencast.com/t/bo3sHgiou
Is that what you want?
Did you try this:
I haven’t tried it yet, thank you!
Is this the solution?
IF I understand you, I think this is what you want.
I’ve just tries it, but still not working. It only shows the results if I set the start date or the end date to the event’s atart date or and date. My event starts at 2020 jan 29 and ends at 2020 feb 5, but when the user search like this: start date: 2020 jan 30, end date: 2020 feb 3, the event does not show up.
What I try to achieve is, that the ongoing events show up in the search result, however it started earlier and will end after the dates that the user set.
The topic ‘Date range filter with Post meta’ is closed to new replies.
© 2024 Search & Filter Support. All Rights Reserved.
This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.
We also use cookies to store items in your cart as well as allowing your to login on the site.
You can adjust all of your cookie settings by navigating the tabs on the left hand side.
By continuing to use this site, you also agree to our Privacy Policy.
Strictly Necessary Cookie should be enabled at all times so that we can save your preferences for cookie settings.
*Other cookies used for logging in and cart functions will only be used when you use those features and cannot be disabled.
If you disable these cookie, we will not be able to save your preferences. This means that every time you visit this website you will need to enable or disable cookies again.
This website uses Google Analytics to collect anonymous information such as the number of visitors to the site, and the most popular pages.
Keeping this cookie enabled helps us to improve our website.
Please enable Strictly Necessary Cookies first so that we can save your preferences!
More information about our Cookie Policy