Range slider behavior when no values

Forums › Forums › Search & Filter Pro › Range slider behavior when no values

Tagged: 

Viewing 5 posts – 1 through 5 (of 5 total)
  • Anonymous
    #131299

    I set up an Advanced Custom Field for “year” and want to filter it with a range slider. Problem is: not all posts will have a year given. When search fires, only posts with years between 1900 and 2017 (range slider min/max) are displayed, but not the ones without any year given.

    Can I change that behavior?

    Like: show all posts ranging from 1900-2017 AND posts without any year.

    Thanks in advance!

    Georg

    Trevor
    #131309

    When you do any range check, any posts with a null value will be omitted from the results. The only way to avoid that is to use a dropdown select control instead.

    Anonymous
    #131348

    Thanks for the clarification, Trevor. A dropdown is less than ideal for a 100+ years timespan, but maybe I will figure out something else. Perhaps decades will do (1990-1999, 2000-2009, etc.).

    Trevor
    #131350

    Whilst it is some months away, V3 of our plugin may offer some alternatives. Why do some posts not have years?

    Anonymous
    #131591

    V3 sounds promising, looking forward to it. In my case, years are not post publishing dates. And why some posts won’t have years? Well, I know my editors. 😉 Even with just a few dummy entries half of the fields are empty. And yet it feels odd that these posts don’t show up in search results at all.

    I followed your advice and used dropdown with clustered options (eg. 1900-1909, 1910-1919, etc.), which is fine for now.

    Thanks again, case closed.

Viewing 5 posts – 1 through 5 (of 5 total)
Search & Filter Support
Privacy Overview

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.