Hi Ross,
I found a minor problem with the renaming of the search variable to ‘_sf_s’ and need your input on a possible solution.
The problem: Some searches on our site use the default WP search box (for various reasons we can’t use the S&F Pro search box). Results are displayed on the standard search.php template, and on the search results page we have our Filters setup. One of the filters is to start a ‘new search’ using an S&F Pro search box.
If a person then starts a new search, the page does not display the new search term, because the template is setup to display the search term using this PHP snippet:
<?php printf( esc_html__( ‘Search Results for: %s’, ‘quark’ ), ‘<span>“’ . get_search_query() . ‘”</span>’ ); ?>
As you can see, the search term is represented by %s, which comes initially from the original search (so that when they first hit the results page they see “Search Results for: [whatever their original search term is]”
SO can I add a variable to replace that %s and use an array that encompasses both ?s= and _sf_s ?
Something like
$x = array(‘?s=’,’_sf_s’) and then change %s to %x ?
I’m not a coder, but I need to find a way for search terms to be displayed to the searcher when they get to the results page from a WP search as well as a S&F Pro filter…….
Your thoughts?
Thanks,
Trisha