Forums Forums Search & Filter Pro Product finder

Tagged: , ,

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

    Hey there, is it possible to have a empty page with the filter and only to show the results after I searched for something?
    Is there a preset for that?

    Would be nice to have a simple solution 🙂 Thank you for your time!

    Trevor
    #249466

    It would require custom coding in the template for the page, around the part that shows the results loop.

    Something like this in PHP (this example assumes you are using our Shortcode method, which in turn uses a template named results.php):

    global $searchandfilter;
    $sf_current_query = $searchandfilter->get(1234)->current_query();
    if ((!$sf_current_query->is_filtered())&&($sf_current_query->get_search_term()=="")) {
      echo '<div>Nothing to see here folks!</div>'; 
    } else {
      // the current products output code here
    }

    The ID number must match that of your form. My message line would simply not be there at all.

    Note, if you are using a page builder, this method may not be possible.

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