Changing search form function correctly
Hello,
<?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.
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
What you ask for, is file customization what in reference to Item Support Policy is not allowed. So if you want to modify files and don't know how, you should contact your web developer. Item Policy says:
Item support does not include services to modify or extend the item beyond the original features, style, and functionality described on the item page. For customization services that will help you tailor the item to your specific requirements, we recommend contacting the author to see if they privately offer paid customisation services or checking out the great service providers on Envato Studio
Would you advice an easier way to do it without file customization?
BeTheme does not have such an option.
You can post your idea here:
https://forum.muffingroup.com/betheme/discussion/113/your-suggestions-for-future-updates#latest
We really appreciate all of them.
Thanks.