Home Forums Pro Themes Clean Commerce Pro Add input in default search form located in header


Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #49713
    Donna Ng

    Basically I want the search form to query the products and not the posts. In order to achieve this I imagined adding an hidden input in the search form to specify the target as below:

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

    I have implemented a few options but none of them works such as creating a new searchform.php file at the root of my child theme or adding a filter in functions.php file on ‘get_search_form’.

    Any suggestions?


    Hello @quintorium,

    To make the search form search the product use you have to activate the child theme .

    Child theme references :


    You can also create the child theme using the plugin . Below is the link to one of them.


    After creating the child theme in your child theme functions.php file paste below given code.


    Hope this helps.

    Let us know if you have any confusion further .

    Best Regards!!

    Donna Ng

    This is exactly what I wanted. It works like a charm.

    Thanks for your help.



    Hello @quintorium,

    Glad we could help you !!

    If you have any issues further, please feel free to post your queries and we will happily help you further.

    We will really appreciate if you could help us too by rating our theme in WordPress repo here:-


    Best regards !!

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.