This topic has 5 replies, 3 voices, and was last updated 10 years, 1 months ago ago by Olga Barlow
Hi, I need to have the autocomplete include tags. I installed this plugin – https://wordpress.org/plugins/search-by-product-tags-for-woocommerce/ – which takes care of adjusting the default search to include product tags, but id doesn’t work with the autocomplete. I fount the function et_get_search_result(), but frankly have no idea how to change it to include the tags. Can you help me on this one? (looks like a great addon to the core btw.)
Hello,
Sorry, but we don’t provide guarantee of full compatibility of 3rd-party plugins with our theme as we don’t test all plugins.
Please take our apologies for inconveniences.
Regards,
Eva Kemp.
Hi. I didn’t mean I need to make it work with this plugin. What I really need is to be able to search by tags, and I hoped the code in the plugin might help with that…
OK, I managed to build this functionality myself… I had to edit theme-functions.php, to be able to filter the WP_Query() object.
Can you please confirm that you include this change in the next theme update? It doesn’t break anything, just adds a possibility to change the posts returned…
function et_search_get_result($args) {
extract($args);
$query = apply_filters('et_search_get_result',new WP_Query( $args ));
.......
The full code to achieve searching products by tags in your ajax search is here (supposed there’s the filter available):
Hello,
Ok, we’ll include this code in our next update. Thank you for cooperation, we appreciate it!
Regards,
Olga Barlow
The issue related to '‘Woocommerce – Search by tags’' has been successfully resolved, and the topic is now closed for further responses