Support Forums

The forums are closed and will be removed when we launch our new site.

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

Stefan van den Berg

Forum Replies Created

Viewing 3 posts - 1 through 3 (of 3 total)
  • Stefan van den Berg in reply to:
    Use shortcode and display results on different pages
    #276745

    In case someone else runs into this problem, this works to add the form to multiple pages:

    function my_set_sf_resultsURL( $url, $sfid) {
    $url = get_permalink();
    return $url;

    }
    add_filter( ‘sf_results_url’, ‘my_set_sf_resultsURL’, 10, 2 );

    Stefan van den Berg in reply to:
    Negative value range – Slider
    #275437

    Hi Ross,

    if you use only negative numbers, everything will work fine because all numbers are made positive before the comparision

    But in my case, the facet search range was for example -2000 till +1000 and I have a setup with a start field and an end field in my post type. The Compare Mode is set to ‘Post Meta must be within input range’.
    A post with a start value of -400 and end value of +200 should be returned by the query. But if the values are cast to an UNSIGNED int, we check if +200 to +400 fals in the range of +1000 to +2000 and it is incorrectly removed from the search results.
    Hope that makes sense.

    Cheers,
    Stfan

    Stefan van den Berg in reply to:
    Negative value range – Slider
    #275392

    I know this is an old post, but someone might be helped by my findings.
    The problem with the range slider using negative number is caused by the filtering code casting the values to UNSIGNED, thus making the negative numbers positive before the comparision.

    If you open the files includes/fields/post_meta_choice.php and public/includes/class-search-filter-cache.php and search for UNSIGNED and replace it with SIGNED (and upload to your server), the filtering will also work with negative numbers.

Viewing 3 posts - 1 through 3 (of 3 total)