WP_Query::is_search() WordPress Method
The WP_Query::is_search() method is used to determine whether the current page is a search page. This method will return true when the search variable is set in the URL.
WP_Query::is_search() #
Is the query for a search?
Return
(bool) Whether the query is for a search.
Source
File: wp-includes/class-wp-query.php
public function is_search() { return (bool) $this->is_search; }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
3.1.0 | Introduced. |