Forums Forums Search & Filter Pro Customize initial results

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

    Is there a way to display different information when the page first loads and only show results once the user makes some choices from the filters? I have two taxonomy dropdowns which allow the user to choose an industry and a specialty. I would like to show a message in the results area OR placeholder/anonymous results until the user makes a choice.

    Thanks for your help.

    Trevor
    #103704

    If you have access to the PHP template files, you can use something like this (change the ID for your form ID):

    global $searchandfilter;
    $sf_current_query = $searchandfilter->get(1234)->current_query();
    if ((!$sf_current_query->is_filtered())&&($sf_current_query->get_search_term()=="")) {
      // your holding template code here
    } else {
      // your normal template code here
    }
    Anonymous
    #103855

    Would this go in functions.php or in /search-filter/results.php?

    Trevor
    #103859

    In the results.php file. You would put the code already there into the second part, and then make your own for the first part.

    Anonymous
    #103861

    Gotcha. Great. BTW, your support is awesome. Thanks for all the quick responses!

    Trevor
    #103866

    Let me know if I can close this thread?

    Anonymous
    #103868

    Yes. You can close.

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