Filter name: etheme_ajax_search_products_sku
#
Filter to add product SKU in search Ajax results on products
Filter usage:
add_filter('etheme_ajax_search_products_sku', '__return_true');
Example:
Before ->
(product SKU is not shown)
After ->
(product SKU is shown for each product that has it)
Filter name: etheme_ajax_search_arrow
#
Filter to hide arrow on each search result item
Filter usage:
add_filter('etheme_ajax_search_arrow', '__return_false');
Example:
Before ->
After ->
(arrow is not shown)
In some languages, this arrow SVG was shown as a 'true' string so this filter hides the arrow and that string is not shown.
Filter name: etheme_ajax_search_products_query
#
Filter to modify search products query by own needs
Filter usage:
add_filter('etheme_ajax_search_products_query', function ($args){ $args['meta_key'] = '_price'; $args['orderby'] = 'meta_value_num'; $args['order'] = 'ASC'; return $args; });
Example:
Before ->
After ->
( products results are sorted by price )
Filter name: etheme_ajax_search_posts_query
#
Filter to customize the global search query according to your own needs
Filter usage:
add_filter('etheme_ajax_search_posts_query', function ($args){ $args[‘relevanssi’] = true; return $args; });