Tagged: relevanssi
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
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
Devin,
Thank you so much for the speedy reply!
Will this code work for Enfold 2.3 + as well?
Cheers
Seth
Yes it should work fine with the update.