Support Forums

Looking for support? You can access the support system via your account.

Forums Forums Search & Filter Pro Range Slider is getting triggered by default

Tagged: ,

Viewing 3 posts - 11 through 13 (of 13 total)
  • Ross Moderator
    #237164

    Hi again

    So I’ve had a chance to digest this ticket.

    In regards to your two issues which are both part of the same problem:

    The way a form submits / resets is to include the sliders at their min / max value. We will try to address this in v3 within the plugin, but for now, if you want to have the same set of results when you reset as when you land on the page you have 2 options:

    a) set a default value on all other posts – you can write a query to loop through all posts where there is no value for this post meta, and then auto add a value like 0

    b) restict the meta query to the slider min/max params (you would have to use fixed min/max limits), you can do that from the post meta tab in your search form – this way the results that are shown when landing on the page, are teh same as when the form is reset / submitted, and the range slider params are added to the URL.

    In regards to the filter: sf_edit_query_args, this is run before S&F applies its workings… S&F does a different kind of query, outside of your WP_Query, which is then combined with the WP_Query, so you can never truly unset that value. Your best bet would be to simply do unset($_GET['filter_name']); (you can dump this in the bottom of your functions.php to test) before S&F grabs the value and applies its sorting.

    I hope that clears a few things up for you?

    Let me know if you have any further questions.

    Thanks

    White
    #237458

    Hello,

    Thanks for the detailed explanation.

    I have solved my problem using unset($_GET['filter_name']);.

    Thanks.

    Trevor Moderator
    #237557

    Thanks for letting us know. I will close this thread for now.

Viewing 3 posts - 11 through 13 (of 13 total)

The topic ‘Range Slider is getting triggered by default’ is closed to new replies.