Forums Forums Search & Filter Pro get wordpress search box search term to the Search & Filter Pro search box

Tagged: 

Viewing 2 posts - 1 through 2 (of 2 total)
  • Anonymous
    #275426

    In the home page, I give user just the regular wordpress search box. I used the ‘Search & Filter Pro search form’ in the archive which works fine if I enter data into search box there, or pick up some category.

    But the search term I put on the home page is not copied to the search box used in the result page.

    when I submit the search from home page regular search box, the URL is http://localhost:8080/testsite/?s=grapes, this search term ‘grapes’ is not in the result page’s ‘Search & Filter’ search box which is empty.

    Hoe do I get wordpress search box search term automatically copied to the result page’s ‘Search & Filter Pro search form’s search box?

    Ross Moderator
    #275448

    Hi Laura

    The problem is that our plugin uses ?_sf_s=Search+Term but the default search box is using ?s=Search+Term

    The _sf_s or s is the name of the search input field used.

    So what you are aiming to do is change the name of this, in your default search field.

    Now, depending on the theme, this could be done a number of ways, or with some, it might be very difficult to achieve.

    The classic method to display a search field in a WordPress site is for the theme to use get_search_form()https://developer.wordpress.org/reference/functions/get_search_form/

    If your theme does that, then you should have a file in the theme folder called searchform.php – so that would be:

    wp-content/themes/your-theme/searchform.php

    You could modify (after copying to your child theme) the name of the input field in this file and it should work.

    However, its possible your theme doesn’t do it this way, in which case you’ll need to check their docs / get in touch with them to see if it can done.

    Thanks

    PS, we have a new support system – this support forum is being retired, you can open tickets for priority support via your account: https://searchandfilter.com/account/support/

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