Tagged: 

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #168288

    Hello,

    Do you know the code string in Enfold 2.2 that needs to be edited to include Relevanssi results which was outlined here for the last version update?

    https://kriesi.at/support/topic/instant-search-not-matching-search-results/#post-135415

    Please reference and include both the code that needs to be replaced and the new code!

    Thank You So Much!
    Seth

    #168752

    Hello sethbutler!

    Add this to your functions.php:

    
    add_filter('avf_ajax_search_function', 'avia_init_relevanssi', 10, 4);
    function avia_init_relevanssi($function_name, $search_query, $search_parameters, $defaults)
    {
        $function_name = 'avia_relevanssi_search';
        return $function_name;
    }
    
    function avia_relevanssi_search($search_query, $search_parameters, $defaults)
    {
        global $query;
        $tempquery = $query;
    
        $tempquery->query_vars = $search_parameters;
        relevanssi_do_query($tempquery);
        $posts = $tempquery->posts;
    
        return $posts;
    }
    

    Best regards,
    Devin

    #168766

    Devin,

    Thank you so much for the speedy reply!

    Will this code work for Enfold 2.3 + as well?

    Cheers
    Seth

    #168811

    Yes it should work fine with the update.

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Enfold Code Update for 2.2 to use Relavanssi Plugin’ is closed to new replies.