Problem with Enfold theme “Instant Search”
-
Hello,
I’m using Enfold, one of the most widespread WP themes, and I have noticed a striking discrepancy on the search results between the “classic” Relevanssi search and the Ajax-driven “Instant Search” used by default on the theme.
In short, the Instant Search does not match the actual entries normally indexed by Relevanssi.The theme’s authors suggested to add the following code to function.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; if(empty($tempquery)) $tempquery = new WP_Query(); $tempquery->query_vars = $search_parameters; relevanssi_do_query($tempquery); $posts = $tempquery->posts; return $posts; }
But that didn’t solved the problem.
I tried to ask for help to the theme’s developer, and he replied: “I am afraid you’ll need to contact the plugin author for more info about the issue. Making third-party plugins compatible with the theme is unfortunately beyond the support scope we offer.”
Does anybody have any suggestion on how to allow Enfold’s “Instant Search” match the entries indexed by Relevanssi?
Thanks for your help!
The page I need help with: [log in to see the link]
- The topic ‘Problem with Enfold theme “Instant Search”’ is closed to new replies.