Forums › Forums › Search & Filter Pro › Presale date range acf
- This topic has 11 replies, 2 voices, and was last updated 8 years, 11 months ago by
Trevor.
-
Trevor(Private) May 8, 2017 at 12:06 pm #107168
You have correctly identified that, at the moment, you can only filter a date range with a date range. It is possible to cheat a bit though. You could add another field to the post with a default date a long way into the future, which would give you a range, which you can then compare to with a range.
Anonymous(Private) May 8, 2017 at 12:13 pm #107172Could you please clarify with an example?
I have multiple posts with dates in an ACF like so:
post1 acf_post_date 14/01/2017
post2 acf_post_date 12/01/2017
post3 acf_post_date 23/02/2017What I would like to happen is that a user can select a date range with a filter e.g.
10/01/2017 -> 14/01/2017
And then it should return post1 and post2 but not post 3
Is this possible with the method you describe?
Trevor(Private) May 8, 2017 at 12:24 pm #107178Actually, try this, without the extra field.
Go to the post meta field. Set it to Date -> Date Range
Deselect the
Use same for End Keysetting and leave both keys as the Start and End keysNow you have a new option select box,
Compare ModeSet that to
Post Meta must be within input rangeDoes that work?
Anonymous(Private) May 8, 2017 at 1:28 pm #107198Hm I just noticed that the fields are not appearing correctly at all :S
[IMG]http://i66.tinypic.com/2m61w5e.png[/IMG]
The standard search form isn’t appearing either :S also without the date field
I selected post type “products” and woocommerce shop and copied the code in a text widget in the widget area of the shop page but only the titles appear not the actual forms.
I also tried disabling ajax loading anything else I should try?
-
AuthorPosts
