A WordPress-centric search engine for devs and theme authors



get_search_query ›

Since2.3.0
Deprecatedn/a
apply_filters( 'get_search_query', get_query_var( 's' )
Parameters:
  • (mixed) $search Contents of the search query variable.
    Required: Yes
Defined at:
Codex:

Filters the contents of the search query variable.





Source

$query = apply_filters( 'get_search_query', get_query_var( 's' ) );