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:


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.


The most customizable eCommerce platform for building your online business.

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