Custom Search Form /w Custom Post Type


To start with I’m using an older version of Roots, just before it became Sage…

The reason I’m asking here, is i’ve tried what WordPress suggested and no luck.


I need a new search form that will only search a custom post type I have called ‘products’.

I’m not sure if there is a specific way I need to do this using Roots.

This is totally not a roots specific question but if resources you’re looking at aren’t working I highly recommend Search WP:

Also if you do think it’s a Roots issue, you’ll have to post what you said you tried - “what WordPress” suggested"

wordpress suggests adding

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

to my search form.

Is nice search enabled? If so have you tried disabling it?

Comment out or remove any lines like: