Dear support team,
the ajax search function is not working properly. It shows the information: “Entschuldigung, aber kein Eintrag erfüllt Deine Suchkriterien
Bitte verwende einen anderen Suchbegriff”, although the search item is existing, and by clicking the search symbol the search list appears.
I hope, you have an idea to hide this information.
Thanks!
Hey elsengold,
The default ajax search does not incclude products, etc. If you want to enhance the search algorithm you can install a plugin like Relevanssi ( https://de.wordpress.org/plugins/relevanssi/ ). Then add this code to your child theme:
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;
}
to use Relavanssi for the ajax search too.
Best regards,
Peter
Hey Dude,
thank you, that works perfectly.
Best regards,
else
Hi,
Great, glad I could help you :)
Best regards,
Peter