Forums Forums Search & Filter Pro Does search and filter pro works with the default WP search?

Viewing 5 posts - 1 through 5 (of 5 total)
  • Anonymous
    #215755

    I’m trying to add a filter in the search.php, but every time I click on a category, it doesn’t take into account the search keyword typed in the WP default search bar.

    Any idea?

    Trevor
    #215772

    You would need to convert the default search into one that directs to a Search and Filter form. In your theme, is default search in the header, or maybe the menu? If so, is the PHP code for that in a theme template file either called header.php or one called searchform.php?

    I would need to see what that looks like, and also advise you to be using a child theme of the parent theme.

    Anonymous
    #215789
    This reply has been marked as private.
    Trevor
    #215810

    The action might need to be changed to point to a specific results page, if you are using a slug in the form settings in the search and filter form. So, like this:

    action="<?php echo esc_url( home_url( '/' ) ); ?>search-results"

    and, in that case the ‘name’ used in the form would change from s to _sf_s

    OR

    If your search and filter form results URL has an sfid in it, then only the ‘name’ of the form would change to something like:

    sfid=46314&_sf_s where the ID is the ID number of your form.

    The search and filter form MUST have the search box in it as well, AND the theme search will not work (together with our search form) ON the results page, as they do not actually talk to each other.

    Anonymous
    #215814

    Thanks Trevor! all working fine!

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