- This topic has 2 replies, 2 voices, and was last updated 8 years, 7 months ago by .
Viewing 3 posts - 1 through 3 (of 3 total)
Viewing 3 posts - 1 through 3 (of 3 total)
These forums are now closed and remain for historical purposes.
None of the content applies to the new version 3. For support, get in touch via our contact form.
Forums › Forums › Search & Filter Pro › Results appear only on submit
Tagged: search results
Hi there,
I would like to have the search and submit button alone on the page and when the search is submitted the results appear underneath. At the moment the results are always there. Is there a way to do this without leaving the page? I am displaying the results as shortcode.
Hi
You need to make sure that you have followed the Customization guide here.
Edit the results.php file like this (where 1234 is changed for the actual ID of your form):
global $searchandfilter;
$sf_current_query = $searchandfilter->get(1234)->current_query();
if ((!$sf_current_query->is_filtered())&&($sf_current_query->get_search_term()=="")) {
// any other message here if no search has been made (can be empty)
} else {
// your results.php code here
}