Forums Forums Search & Filter Pro Is it possible not to display articles initially

Viewing 7 posts - 1 through 7 (of 7 total)
  • Anonymous
    #228800

    I have a search form composed of checkbox.
    Is it possible not to display articles initially, when no checkbox is checked? Currently, I have all items, which are filtered only if at least one box is checked.

    Trevor
    #228824
    This reply has been marked as private.
    Anonymous
    #228851
    This reply has been marked as private.
    Anonymous
    #228853
    This reply has been marked as private.
    Trevor
    #228859

    Ah. Ok, here is what to do:

    global $searchandfilter;
    $sf_current_query = $searchandfilter->get(1120)->current_query();
    if ((!$sf_current_query->is_filtered())&&($sf_current_query->get_search_term()=="")) {
      echo '<div>Nothing to see here folks!</div>'; 
    } else {
      // your current results template code here - the if have posts bit.
    }
    Anonymous
    #228879

    Perfect !
    Big thanks, Trevor !

    Trevor
    #228881

    Thanks for letting me know. I will close this thread for now.

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