A
A
alexiusgrey2021-12-03 16:52:24
WordPress
alexiusgrey, 2021-12-03 16:52:24

How to do. so that the search returns products when you enter the category name in Woocommerce?

If you search by the name of the product, then it searches. and if by category name, then nothing was found.
The search form is the most common, like this.
It is the category of goods product category, and not category records.

<form method="get" class="searchform searchform_theme" action="<?php echo esc_url(home_url('/')); ?>">
   <input type="search" placeholder="Search..." value="<?php get_search_query();?>" name="s" class="search_btn form-control">
   <button type="submit" title="Search" class="fa-search" id="search_btn"></button>
</form>


I found a method with a select, but not that. It is not on the layout, you just need to enter it in the line.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question