Skip to content

Instantly share code, notes, and snippets.

@rmorse
Last active January 7, 2024 03:09
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rmorse/968929cf65e7608a888b to your computer and use it in GitHub Desktop.
Save rmorse/968929cf65e7608a888b to your computer and use it in GitHub Desktop.
Search & Filter Pro - Active Query - Get the search term
<?php
//Get the search term
//replace `1526` with the ID of your search form
global $searchandfilter;
$sf_current_query = $searchandfilter->get(1526)->current_query();
echo $sf_current_query->get_search_term();
?>
@yoske25
Copy link

yoske25 commented May 7, 2019

Hey. How can I use this to generate Custom Made page title based on this query?
Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment