1. Documentation /
  2. Codex /
  3. Theming /
  4. Overriding the product search box (widget)

Overriding the product search box (widget)

For tips on how to override this function, see: Template Structure + Overriding Templates via a Theme.

The product search box widget loads the search box using the template function:

get_product_search_form()

For more info, see: Function get_product_search_form.

It then looks for the product search form in the file ‘product-searchform.php’ or uses its default markup. You can override the default WooCommerce template product-searchform.php by customizing the markup.

For reference, the default markup is:


The form is also run through the filter get_product_search_form.

WooCommerce

The most customizable eCommerce platform for building your online business.

  • 30 day money back guarantee
  • Support teams across the world
  • Safe & Secure online payment