Forums Forums Search & Filter Pro Search & Filter and Beaver Builder Search Template

Tagged: 

Viewing 6 posts - 1 through 6 (of 6 total)
  • Anonymous
    #185679

    Hello,

    I’ve created a Search Template in Beaver Themer. This works great when I use Search & Filter Free. However, in Search & Filter Pro I am not able to select it. Instead, I can only select the Single Archive Template. Can you please help me select the Search Template?

    The Search template is an Archive that is displayed only for search results.

    Thank you very much!

    Trevor
    #185694
    This reply has been marked as private.
    Trevor
    #185803

    Hi Rose

    Great to speak with you. I will knock up some PHP for you to do the title (Search Results for: xxx) you need and post it here early tomorrow, or maybe later today, depending on work load.

    Trevor

    Anonymous
    #185811

    Hi Trevor,

    Great speaking with you too! Thank you very much!

    Best,
    Rose

    Trevor
    #185844

    Hi Rose. I think this code will do as you want, but note that you need to change the ID of the form used. Also note that the Post Snippet plugin does not require the use of <?php and ?>.

    global $searchandfilter;
    $sf_current_query = $searchandfilter->get(1234)->current_query();
    if ($sf_current_query->get_search_term()=="") {
      echo '<h2>No Search Term</h2>'; 
    } else {
      echo '<h2>Results for: ' . $sf_current_query->get_search_term() . '</h2>';
    }

    i hope that works. Modify the HTML and messages to suit.

    Anonymous
    #185920

    Hi Trevor,

    This is perfect! Thank you so much for your help! Have a great weekend!

    Best,
    Rose

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