get_search_query


get_search_query ( $escaped = true )

Parameters:
  • (bool) escaped Whether the result is escaped. Default true. Only use when you are later escaping it. Do not use unescaped.
Returns:
  • (string)
Defined at:

Description

Retrieves the contents of the search WordPress query variable.The search query string is passed through esc_attr() to ensure that it is safe for placing in an HTML attribute.

Related Functions

the_search_query, get_search_form, _admin_search_query, get_search_link, get_search_template

Top Google Results

User discussions

wpseek mobile