Hi,
I need to make two input search fields - min price and max price, that sort content independently.
More information - i need input field 1 to be price from and input field 2 to be price above and when I search field 1 to show only results from that price.
The "price" field is another plugin custom field and it's single - no min and max values, just numbers.
Sorting is working fine, but I cannot make it work with the search parameters.
This is the shortcode Minesh from support added to my custom search:
[wpv-control-postmeta field="price" type="input" default_label="Цена" url_param="wpv-price"]
This works fine if I write singe price, but the website I'm developing for a client will have hundreds of listings and I need to make it more user friendly.
I tried conditional block, but the block does not recognize the shortcode from above.
Hello. Thank you for contacting the Toolset support.
To filter with price range, you can use the following filter shortcode that will add Price From and To textboxes where user can input minimum and maximum price:
And you can setup the query filter as given under:
Select items with field:
price is a number between URL_PARAM(wpv-price_min), URL_PARAM(wpv-price_max)
Please check the following screenshot:
- hidden link
- If user input both min and max price then you want to display result that falls between the provided price min and max range.
- if user input only min range then you want to display result that falls greater than provided min price.
- if user input only max range then you want to display result that falls less than the provided max price.
Is that correct? If not, please share your exact requirement how it should work.
But yes, what i meant by "work independently" in my first comment is exactly what you described.
When user places only price greater than X, get results for that. When user places both price greater and lower than X, get results that fall between those numbers.