Hi, I'm trying to pass along search queries to my own php variable, but the_search_query() seems to only directly output content to the browser. In other words, this doesn't seem to work:
$SearchQuery = the_search_query();
- Is there a function for search similar to what the_title(false) or get_the_title allow?
- does the_search_query() work only inside the Loop?
Any help appreciated, thanks. I have searched the codex, this forum, and Google, and found very little information about the WordPress search engine.
While I'm at it, suggestions to improve the documentation:
- put something at http://codex.wordpress.org/Search
- add a search section in http://codex.wordpress.org/Template_Tags