1. Home
  2. Documentation
  3. WooCommerce Product Table
  4. FAQ
  5. Can I add a search box to my homepage on its own, and show the product table in the search results?

Can I add a search box to my homepage on its own, and show the product table in the search results?

The search box provided in WooCommerce Product Table only ever appears above the product table, and never on its own. When you type into it, the products in the table instantly update underneath in real time.

If you want to show a search box on a page without a product table (e.g. your homepage), then you will need to use the default WooCommerce product search instead. This creates a standalone search box that you can add anywhere on your site. WooCommerce comes with a ‘Product Search’ widget, which you can find in Appearance > Widgets. If your homepage contains a widgetized area then you can add the widget there. If you need to add it to the main content area of a standard page, then you can use a plugin such as AMR Shortcode Any Widget which lets you put widgets anywhere on your site.

To show search results in a product table layout, you will need to follow the instructions for adding the product table to your WooCommerce search results template.

Was this article helpful?

Related Articles