Search Term not displaying

Forums › Forums › Search & Filter Pro › Search Term not displaying

Viewing 5 posts – 1 through 5 (of 5 total)
  • Anonymous
    #87735
    global $searchandfilter;
    		$sf_current_query = $searchandfilter->get(1111)->current_query();
    		echo $sf_current_query->get_search_term();

    When using this code, no search term gets displayed. Is there something I am missing>

    Trevor
    #87753

    Are you trying to display what the current filter parameters are? The chances are that what you are trying to echo is in fact an array, in which case try print_r

    This post has a more complex example of what you might be looking for:

    https://support.searchandfilter.com/forums/topic/results-displayed-results-count-searched-tag-associated-categories/

    You will want to copy and paste the code into a code editor (I use the free editor from Adobe called brackets.io) so you can see it better.

    Anonymous
    #89485

    Thanks!

    Trevor
    #89497

    Let me know If I can help you more, and if not, can I close this thread?

    Anonymous
    #89538

    you can close the ticket

Viewing 5 posts – 1 through 5 (of 5 total)
Search & Filter Support
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.

We also use cookies to store items in your cart as well as allowing your to login on the site.

You can adjust all of your cookie settings by navigating the tabs on the left hand side.

By continuing to use this site, you also agree to our Privacy Policy.