Forums Forums Search & Filter Pro Remove all the result at the beginning

Tagged: 

Viewing 3 posts - 1 through 3 (of 3 total)
  • Anonymous
    #184553

    Hi, how can I start with no result at the beginning?

    Trevor
    #184592

    If you are using the Shortcode results method, and our results.php template file, it would look like this:

    global $searchandfilter;
    $sf_current_query = $searchandfilter->get(1024)->current_query();
    if ((!$sf_current_query->is_filtered())&&($sf_current_query->get_search_term()=="")) {
      echo '<div>Nothing to see here folks!</div>'; 
    } else {
      // your template archive code/loop OR results.php code here
    }

    Change 1024 to the ID number of your form (from the form shortcode).

    Anonymous
    #184887

    Thanks. It works 🙂

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