Changing search form function correctly

Hello, 

I've bee trying to set all search form options to act just like the "shop" one, since I want to use the css associated with the "input" option (Search Field) so as to be able to have a search bar on my header that returns only woocommerce product results (instead of the clickable search icon that pops up the form).

I tried changing this code on "searchform.php" 


<?php if( mfn_opts_get('header-search') == 'shop' ): ?> <input type="hidden" name="post_type" value="product" /> <?php endif;?>

to this 

<?php if( mfn_opts_get('header-search') == 'input' ): ?> <input type="hidden" name="post_type" value="product" /> <?php endif;?>


but somehow the "input" setting keeps overriding and returning all kinds of blog values instead of shop products.

Thank you.





Comments

Sign In or Register to comment.