In Wordpress / WooCommerce I want to search by Category but somehow I cant get it to work.
The normal Search works and gives me this url http://localhost:8888/rwdr/search/[searchkeyword]
how does the url look like when searching in a category?
<form role="search" method="get" id="searchform2" action="" class="">
<ul class="radio-ul">
<li>
<label for="typBA" class="typ typBA "></label>
<input name="category" id="typBA" value="BA" type="radio">
</li>
<li>
<label for="typBAX7" class="typ typBAX7 "></label>
<input name="category" id="typBAX7" value="BAX7" type="radio">
</li>
<li>
<label for="typBASL" class="typ typBASL "></label>
<input name="category" id="typBASL" value="BASL" type="radio">
</li>
</ul>
<label for="InputBox">Input Box</label>
<input type="text" value="" id="first" name="s" />
<input type="hidden" value="" name="x" /> </form>
I really appreciate any help!
You can do a search using standard query in your url
yoursite.com/?post_type=product&taxonomy=product_cat&term=your_category_slug&s=a
To get the URL, you can build a form like this,
In WordPress, I use a plugin called "Search Everything", where you can set if you want to add categories, tags and many other options to the search results. It's pretty easy to use and it works fine to me.