Forums Forums Search & Filter Pro Alter Template After Filter Fires

Viewing 3 posts - 1 through 3 (of 3 total)
  • Trevor
    #255240

    The PHP to use to conditionally run code looks like this (change the ID of the form to suit):

    global $searchandfilter;
    $sf_current_query = $searchandfilter->get(1234)->current_query();
    if ((!$sf_current_query->is_filtered())&&($sf_current_query->get_search_term()=="")) {
      // the current (unfiltered) posts output code here
    } else {
      // the desired (filtered) posts output code here
    }
    Anonymous
    #255314

    Perfect, thank you!

    Trevor
    #255316

    Thanks for getting back to me. I will close this thread for now.

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