Home Forums Space themes support forum Relevanssi different results ajax search vs default search

Relevanssi different results ajax search vs default search

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #440418

    John
    Participant

    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

    #440706

    Artem Temos
    Keymaster

    Hello,

    Make sure that you have the “Use Relevanssi for AJAX search” option turned on in Theme Settings -> General -> Search.

    Kind Regards

    #440744

    John
    Participant

    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. šŸ™

    #440756

    Artem Temos
    Keymaster

    Could you please send us an example word so we can see the difference?

    #440757

    John
    Participant

    Try with termostat

    #440762

    Artem Temos
    Keymaster

    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?

    #440794

    John
    Participant

    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!

    #440826

    Artem Temos
    Keymaster

    Great, we are glad that you sorted it out!

Viewing 8 posts - 1 through 8 (of 8 total)

The topic ‘Relevanssi different results ajax search vs default search’ is closed to new replies.