Support Forums

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

Forums Forums Search & Filter Pro Adaptive filter on Search results page

Viewing 10 posts - 1 through 10 (of 19 total)
  • Luuk Driessen
    #198581

    Hi Guys,

    – Filters on Category + Brand pages works great.
    Check: https://www.bjctools.nl/product-categorie/tuin-en-park/bladblazer/

    But when we search on a specific term/product, ALL the filter values are showing.
    We are using the same filter as for the category and brand pages.

    How can we correct enable the adaptive filter values on the search results page.

    Thanks in advance

    Gr Luuk

    Trevor Moderator
    #198589

    Could you give me an example search (or series) to make, and what you see, and what you WANT to see instead?

    Luuk Driessen
    #198643
    This reply has been marked as private.
    Trevor Moderator
    #198669

    Can I ask if you have these settings on the General settings tab:

    Set Auto Count (both settings) to ON

    And then in the Form UI:

    In each field set Hide Empty to ON

    If you don’t, can you try that?

    Luuk Driessen
    #198671
    This reply has been marked as private.
    Trevor Moderator
    #198673

    Can you give me an example of a page that does NOT work properly on?

    Luuk Driessen
    #198804
    This reply has been marked as private.
    Trevor Moderator
    #198812

    That search is made with your theme’s search, and not ours. You would need a search box in our form, and then the url would need to be:

    https://www.bjctools.nl/producten/?_sf_s=baier

    You see the different variable name being used by a normal WordPress search (s) and our search (_sf_s)?

    That means you also need to place a rewrite in your child theme functions.php file, something like this:

    function sandf_change_search_url_rewrite() {
    	if ( is_search() && ! empty( $_GET['s'] ) ) {
    		wp_redirect( home_url( "?_sf_s=" ) . urlencode( get_query_var( 's' ) ) );
    		exit();
    	}	
    }
    add_action( 'template_redirect', 'sandf_change_search_url_rewrite' );

    This will cause any search done in your theme search to be changed to our type of search, I think (hope).

    Luuk Driessen
    #198814

    Thanks for your quick reply.

    We added the code to our functions.php (snippets plugin)

    After saving, it shows an error.

    fatal error on row 2:
    syntax error, unexpected ‘;’

    Trevor Moderator
    #198816

    I do not see any errors in my code. Are you using a child theme?

Viewing 10 posts - 1 through 10 (of 19 total)

The topic ‘Adaptive filter on Search results page’ is closed to new replies.