admin管理员组文章数量:1289348
I am trying to implement a product category search. Here is my searchform.php Here is the image of what I intent to achieve
<form id="searchform" method="get" action="<?php echo esc_url( home_url( '/' ) ); ?>">
<input type="text" class="search-field" name="s" placeholder="Search Product" value="<?php echo get_search_query(); ?>">
<input type="hidden" name="post_type" value="product" />
<select name="product_cat">
<option value='0'> All </option>
<option value='weitere-losungen'>weitere-losungen</option>
</select>
<input type="submit" value="Search">
</form>
?s=&post_type=product&product_cat=0
This as a search parameter returns all products. But when I select any other category ?s=&post_type=product&product_cat=weitere-losungen
it returns zero products.
本文标签: categoriesProducts category search not working
版权声明:本文标题:categories - Products category search not working 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741394564a2376300.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论