I DO see that searching for product tags has been added and completed within the Taskboard here: https://www.screencast.com/t/lTvofWT7o5sP
But I do not see an option for this anywhere within the theme customization tools. Please advise.
How to search using product tags within the live search
9 replies2 participantsUpdated by Olga Barlow
-
9 Answers
#313822 Copied#313860 CopiedHi Olga,
I do see that option. However, the live search does not show results for product tags. For example, my product has a tag named “t-shirt” and I have that tag listed in the tags section within the live search, but when I click on the tag “t-shirt” no products are found. Is there any known way to add product tag searching to your live search bar?
Thank you
#313891 CopiedHello,
Nope, we don’t have such an option for the search input, unfortunately. It requires additional customization or use a third-party plugin to implement such search.
Regards
#314066 CopiedHi Olga,
Is there anyway that you can help me implement the Relevanssi search plugin into the theme’s live search plugin so that users can search product tags. I have added the Relevanssi search plugin and setup the queries and it appears that the plugin is working for the search, but not the live search. I did a search on the comments section and it looks like someone else was able to get it setup here: https://www.screencast.com/t/7IZ7k2YPsU but I cannot seem to get it working. This is the plugins knowledge base https://www.relevanssi.com/category/knowledge-base/ Do you have any knowledge of how to get this functioning with your theme? Thank you for your time.
Please contact administrator
for this information.#314187 CopiedHello,
Does that plugin have the search widget or search form shortcode with the live search? In this case, you’ll be able to replace our search element with the plugin shortcode using the HTML block element.
Regards
#314256 CopiedHi Olga,
Actually, Relevanssi creates a custom search index and replaces the internal WordPress search. So what I am trying to do is turn off the XStore search queries/index within your live search and allow Relevanssi to provide the search queries with its index instead. I hope this makes sense.
#314259 CopiedSo I reached out to the Relevanssi plugin developer and he has strived to make his plugin compatible with all of the big themes, and he is interested in making compatible with your theme as well.
The plugin developer provide this code for me to enter into functions.php and it allowed me to add WooCommers Product and Product Taxonomies (i.e. Product Tags, Variations, etc.) to your themes Live Search:
add_filter( ‘etheme_ajax_search_products_query’, function( $args ) {
$args[‘relevanssi’] = true;
return $args;
} );He said that in order to make all other Post Types and Taxonomies to be compatable with your theme is for you to simply add a filter hook to the post search, it’d be one line of code, and then it would be easy to make that search use Relevanssi indexing queries.
The plugin developer provided this: “Could you please add a filter for the get_posts() arguments in
get_posts_results() in class-ajax-search.php, matching the etheme_ajax_search_products_query filter in get_products_results()?”This would allow the users of your theme to use Relevanssi for searching Product Tags and any other Post Type and custom Taxonomy as they see fit, and the plugin is free to do all of this. They have a premium version, but this is not necessary for the Post Types I have mentioned.
Please let me know if this can be accommodated? Thank you for your time.
#314298 CopiedHello,
I passed your request to our developers. They will add etheme_ajax_search_posts_query filter in the next theme update.
Regards
#314335 Copied -
Tagged: how to, json, live search, product tags, search tips, woocommerce, wordpress
-
Want to reply? Log in, or register with your ThemeForest purchase code, to reply to this topic.
Similar topics
- Live Search Product Icon Images are not the correct sizeWhen opening the Live Search in my Main Header, the Product Icons (thumbnails) are normal size like presented in your demo…Solved4 replies
- Live search isn’t working, search itself worksSince the last update the live search doesn't work. It doesn't show any results. When entering the results show, so the search…Solved4 replies
- Search bar not displaying live search resultsWe are also having issues with our search bar not displaying live search results. Usually when you type something it will start…Solved1 reply
- Product tags chips between the breadcrumbs and the shop toolbarI want ot know if there is a prebuilt theme option to add Product tags chips in between the breadcrumbs and the shop toolbar in…Solved10 replies
- Live Search speed site AJax takes to longI am having issues with the search bar being slow during the initial Ajax search. When I perform the initial search it takes a…1 reply
- Product tags widget is not workingI'm trying to put the WooCommerce Product Tags widget on any of the sidebars widget area available in the theme, even in a custom…Solved3 replies















