Forums › Forums › Search & Filter Pro › Price Slider and ACF number fields
Tagged: price slider acf number range
- This topic has 7 replies, 3 voices, and was last updated 9 years, 4 months ago by Anonymous.
-
Anonymous(Private) June 22, 2015 at 1:52 pm #19991
hey,
really great job with your plugin, so far almost everything worked very smoothly. i have two questions though:
1. i want to filter a range number and read in the forum about a price slider. but i couldn’t find anything like that in my search and filter pro admin. do i have to install woocommerce to activate it? since i don’t need woocommerce that would be a bit useless 😉
example:
i have two acf meta fields: “voltage min” “and voltage max” in my database. in the search form i want to use a number range slider that would then show the matching results.2.
when i create a number field in acf i can’t select it as a meta key in search and filter when i create a post meta field. so i had to change all number fields to text fields. text fields i find without any problems. is that a bug?best regards
Anonymous(Private) June 22, 2015 at 4:52 pm #20011hey,
just solved the problem with the number fields (2.): somehow only keys are selectable that are already used by an instance of a custom post type. so when i create a nex field group in acf without creating a test object, i can’t select the newly created keys…
regards
Anonymous(Private) June 22, 2015 at 9:52 pm #20038You’re on the right track – just create a ‘dummy’ custom post with values in those number fields that you set up for it in ACF….once you have ‘saved’ a Post, even if it isn’t published, those keys are created and you can then use them in S&F Pro.
To use them, in your search filter add a “Post Meta” field, and in the tab labeled “Number” choose the slider from the drop-down list of choices for how to display the filter. Enter your min and max values.
Of course, until you have some ‘real’ Posts published, your filter won’t do anything. 🙂
Anonymous(Private) June 29, 2015 at 3:01 pm #20428hey,
that’s what i already acomplished by myself, but in this way i can select just one meta-key. i couldn’t find out how to select two meta-keys and THEN use the slider to filter the range between this two keys. maybe my example was not clar enough, here is another try 😉
example:
i created two meta-fields with acf: “voltage min” “and voltage max”. then i created two dummy posts:
test1 (voltage min=1, voltage max=4)
test2 (voltage min=3, voltage max=5)after that i want to modify the search filter so that i have one slider that filters the range between “voltage min” and “voltage max”.
for exmample i set this range slider to “1-4”, then it would show both dummy post as a result, but if i would change it to “5-10” it would only show “test2”.
maybe a price example would be used by more users but but i think you get the point 😉
best regards
Ross Moderator(Private) June 29, 2015 at 4:46 pm #20431Hey Alleadin
At the moment you can only select 1 meta key per field – number and date ranges will soon support different meta keys for start/end – this will come with S&F 2.0 🙂
Thanks
Ross Moderator(Private) July 3, 2015 at 11:44 am #20687Not got a date 100% just yet, but in the next few weeks.
I’m hoping the add the feature you mention in the next week so I could send you a beta to test?
Thanks
-
AuthorPosts