wordpress / latest / hooks / get_search_form.html

apply_filters( 'get_search_form', string $form, array $args )

Filters the HTML output of the search form.

Parameters

$form string
The search form HTML output.
$args array
The array of arguments for building the search form.
See get_search_form() for information on accepted arguments.
More Arguments from get_search_form( ... $args ) Array of display arguments.
  • echobool
    Whether to echo or return the form. Default true.
  • aria_labelstring
    ARIA label for the search form. Useful to distinguish multiple search forms on the same page and improve accessibility.

Source

File: wp-includes/general-template.php. View all references

$result = apply_filters( 'get_search_form', $form, $args );

Used By

Used By Description

Changelog

Version Description
5.5.0 The $args parameter was added.
2.7.0 Introduced.

© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/get_search_form