Relevanssi different results ajax search vs default search
-
Hello,
We have tested relevanssi on both Woodmart and some space themes, but on Hitek for ex; search results are different from ajax ones. (woodmart works as intended) .
Any suggestion on what could cause this? Is like relevanssi doesn’t have any effect on the default search page and the query is messed up.
Thank you.
I have left the live website so you can test it also.
Thanks
Hello,
Make sure that you have the “Use Relevanssi for AJAX search” option turned on in Theme Settings -> General -> Search.
Kind Regards
Hey there
Yes, ofc I have that option enabled on theme settings. As you could see ajax is working properly but not on the search page. 🙁
Could you please send us an example word so we can see the difference?
Could you please test the search page results with the default WordPress theme to see if it shows the same results as on the WoodMart search page or on AJAX results?
Hello,
We have tested and seems that a custom function that we have on functions.php influences the search.
It’s a function that sorts the product by stock and displays the products out of stock last in the shop.
add_filter( ‘woocommerce_get_catalog_ordering_args’, ‘outofstock_last_page’, 9999 );
function outofstock_last_page( $args ) {
$args[‘orderby’] = ‘meta_value’;
$args[‘meta_key’] = ‘_stock_status’;
return $args;
}
We have removed and solved the issue.
Thank you for your support!
Great, we are glad that you sorted it out!
The topic ‘Relevanssi different results ajax search vs default search’ is closed to new replies.