question about the_search_query()
-
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();
Questions:
– Is there a function for search similar to what the_title(false) or get_the_title allow?
https://wiki.www.ads-software.com/?pagename=get_the_title– 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 https://codex.www.ads-software.com/Search
– add a search section in https://codex.www.ads-software.com/Template_Tags
- The topic ‘question about the_search_query()’ is closed to new replies.