Search for Woocommerce

Hello! How can I redo the search in the HEADER to search for products and not posts?

Hello there,

To accomplish it, try doing the below steps, please:

  1. Install and activate the TC Custom JavaScript plugin
  2. Go To Appearance > Custom JavaScript
  3. Paste the following code into the provided box
;(function($) {

   'use strict'

   $('.search-box__input').append('<input type="hidden" name="post_type" value="product"></input>');
  1. Update
  2. Clear any applied cache.


1 Like

Sorry, I just saw you…In the mobile version search the posts. Can this be corrected?

Probably your mobile browser has a cache that doesn’t load the new code addition. Try flushing it and reload your site.


Checked on the Android and IPhone. Everywhere cleaned the cache

Deleting the browser cache did not help

Hello, I cleared chache even opened in new mobile browser, still doesnt, work.

Any ideas,
Thank you

As cheched, the search box is already working correctly as seen on the below video recording.

Have you been able to fix it by yourself?

Stay safe.
Have an excellent day :slight_smile:

aThemes Support


yes, this works perfect on desktop. When you try to search on mobie, it will not show prices, and the whole layout is different. I need to fix it on phone, thank you!

Sorry I know you dont speak slovak, try to look for word “pelech” so you can see what it does and what it does not.

To compare, try to use the other search bar we have in menu.

Thank you for your help

Any answer please?

Thank you