- This topic has 3 replies, 2 voices, and was last updated 4 years, 6 months ago by .
These forums are now closed and remain for historical purposes.
None of the content applies to the new version 3. For support, get in touch via our contact form.
Forums › Forums › Search & Filter Pro › Hide empty ranges (range filter dropdown)
Tagged: V3
I am not sure what you mean by empty ranges, but … range type fields do not filter down to take account of other form field choices in the current version of our plugin, although that behaviour may change in V3, which we plan to release in a few months (in the New Year).
This is intentional, as explained here:
With empty ranges I meant a range that has no posts with the queried values.
eg.
I have 3 products with prices:
10, 14, 25
I use a dropdown range with the ranges:
10-15
15-20
20-25
The range 15-20 is “empty”, it has no results.
But this range is still displayed in the dropdown filter even though it has no possible results.
Ah. I understand. You cannot manually hide them because new posts added would make that hard to maintain, but there is no automatic way to detect whether there a are no posts for that entry, so you cannot use a Hide empty type of feature either.
All you could do is to make another custom field for the posts, and place the range entry as a term in each post, and make the form UI field a choice type field. As it is a Post meta, you could manually decide the order and which ones to exclude. This would require more work on making and editing the posts though.
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