1

I want to change woocommerce search. And want to limit the search to Product title and Category and Tag only excluding description and short description.

Search Form is in plugins/woocommerce/woocommerce-template.php file, Named get_product_search_form(). but how to apply filter at search of this form.

2

There are no specific searches for WooCommerce. It utilizes WordPress default search system. By default WordPress does not search within tags ( not sure if that has changed for WP 3.6 ). It searches only in titles and description. This is the same if it is for a product.

0

Here I am, a little late, but this Question came up in my search, and I thought I could drop two links about it.

A plugin that could prove useful is SearchWP. But, if you would like to read a bit and write your own code, you could take a look at James Collings' blog, which contains a lot of useful information and hints.

Note: When reading Collings' article and copy/pasting his code into your own, don't forget to change the names of WP tables to a more portable format; for example:

wp_postmeta

should become

" . $wpdb->prefix . "postmeta

And, of course, put a

global $wpdb;

line at the beginning of the functions using the prefixes (otherwise PHP won't know where to go to load that $wpdb object)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.