Display search term in results.php file

Forums › Forums › Search & Filter Pro › Display search term in results.php file

Viewing 5 posts – 1 through 5 (of 5 total)
  • Anonymous
    #186044

    Hi – I am attempting to display the searched text term in the results.php file but cant seem to get it to appear…

    I was thinking this should work:

    You searched for <?php echo $sf_current_query; ?>.
    Found <?php echo $query->found_posts; ?> Results<br />
    Page <?php echo $query->query['paged']; ?> of <?php echo $query->max_num_pages; ?><br />

    But it doesn’t fetch the search term…?

    Trevor
    #186049

    The PHP shown in this post is how you would display a text search terms:

    https://support.searchandfilter.com/forums/topic/search-filter-and-beaver-builder-search-template/#post-185844

    In general, this documentation shows how how access the search query/data:

    https://searchandfilter.com/documentation/accessing-search-data/

    Anonymous
    #186055
    This reply has been marked as private.
    Anonymous
    #186059
    This reply has been marked as private.
    Trevor
    #186065

    That would be to do with redirects set in your server, possibly in the .htaccess file. I am pleased you got it sorted, so I will now mark this thread as resolved.

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.