Last active
January 7, 2024 03:09
-
-
Save rmorse/968929cf65e7608a888b to your computer and use it in GitHub Desktop.
Search & Filter Pro - Active Query - Get the search term
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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(); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey. How can I use this to generate Custom Made page title based on this query?
Thank you