Forums › Forums › Search & Filter Pro › Show results <= value from ACF field
Tagged: custom search, Edit Query Arguments
- This topic has 7 replies, 2 voices, and was last updated 4 years, 4 months ago by Trevor.
-
Anonymous(Private) June 16, 2020 at 5:34 pm #249026
Hi,
I have a search form with a bunch of dropdowns with values coming from ACF. If the visitor selects say a price of $90/night I’d like S&F to return all properties with a price up to $90. At the moment it will return only those properties matching $90/night. I’ve tried to use the Edit Query Arguments but I’m probably doing it wrong as S&F then just stops working. Maybe a little example could help! Thanks
PS: If I may ask, why are there so many private answers in the forum?Trevor(Private) June 17, 2020 at 11:46 am #249084I will take the last question first. Private answers will contain site sensitive information, where only the original thread creator and our tech support users can see the content. This happens a lot in technical support.
At the moment there is no easy to way to do as you want, so, if you are searching a custom field (post meta) you should select a Number type of search using a range, and manually set the start of the range to 0. The user can then select the upper range point.
Anonymous(Private) June 22, 2020 at 2:07 pm #249632Thank you for your quick reply Trevor.
I will keep the plugin. Hopefully you’ll add this function. Meantime I coded a custom query with an Elementor form. The number type range is nice but I had to edit the template to add some classes to style the labels which are set to H4 (if I well remember).
BTW, a bit off-topic but is it possible to create child templates/files?Anonymous(Private) June 29, 2020 at 3:38 pm #250488Sorry to the late reply. Your email landed in the spam folder.
I mean if I change the structure of a file in the plugins directory this change will be lost when I update the plugin. With WooCommerce for example I can create a copy of a template file and move it in the child theme folder and then edit it. Is it possible to the same with S&F? Thank you.Trevor(Private) June 29, 2020 at 4:47 pm #250514Only one of the Display Results methods uses a template that will look in the child theme folder, which is our Shortcode method, as detailed here:
https://searchandfilter.com/documentation/search-results/using-a-shortcode/#customising-the-results
A number of methods use theme templates, and follow the normal rules of using templates found in the child theme folder.
Which Display Results method are you using?
Anonymous(Private) June 29, 2020 at 6:40 pm #250565Well, now I coded the search filter as the plugin is not able to solve my issue (the reason of this thread). I did change the code of submit.php to add Elementor code for styling the submit button.
I would probably edit the range slider to add extra classes to better style the labels and the prefix text as I can’t for example say From [value field] – to [value] because there is only one prefix field in the Range filter.The plugin looks promising. I hope you’ll add more options to it and many more classes, so we can style it more. Also, I hope you’ll add an option to have a horizontal layout. Let’s see v3!
And thank you for your quick replies Trevor!
-
AuthorPosts