Replace Default WordPress Search Pages w/ WooCommerce Search Pages

I haven’t been able to get the Algolia Search for WordPress plugin to effectively replace the default WordPress search results page. For example, if you search “chairs” in the magnifying glass search in the nav menu, the Algolia Instant Search works fine, but pressing enter leads to this search result page (https://www.officebarn.biz/?s=chair), which is the default WordPress search page instead of the default WooCommerce search page. If you search “chairs” from the search field below the headline in the homepage header, the Algolia Instant Search still works fine, but it leads to a WooCommerce search page (https://www.officebarn.biz/?s=chairs&post_type=product), which is what I want. How can I force every search on the website to lead to WooCommerce search pages rather than WordPress default search pages?

Hi @seoskyrocket,

If you only want search boxes that lead to product results you need to swap the default search widget with the “WooCommerce product search” one.

You can do so from your admin in Appearance -> Widget.

Does that answer your question?

Thanks for the quick reply. The search that I want to adjust isn’t widgetized. It’s built into the nav menu of the website…

Hi,

In that case you need to add a hidden to the form:

<input type="hidden" name="post_type" value="product">

Let me know if that works.