Support Forums

The forums are closed and will be removed when we launch our new site.

Looking for support? You can access the support system via your account.

Forums Forums Search & Filter Pro Customize initial results

Viewing 7 posts - 1 through 7 (of 7 total)
  • Damon Tribble
    #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 Moderator
    #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
    }
    Damon Tribble
    #103855

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

    Trevor Moderator
    #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.

    Damon Tribble
    #103861

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

    Trevor Moderator
    #103866

    Let me know if I can close this thread?

    Damon Tribble
    #103868

    Yes. You can close.

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

The topic ‘Customize initial results’ is closed to new replies.