apply_filters( ‘get_search_form’, string $form, array $args )

In this article

Filters the HTML output of the search form.


The search form HTML output.
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.
  • echo bool
    Whether to echo or return the form. Default true.
  • aria_label string
    ARIA label for the search form. Useful to distinguish multiple search forms on the same page and improve accessibility.


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


5.5.0The $args parameter was added.

User Contributed Notes

You must log in before being able to contribute a note or feedback.