Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › The search bar does not work in translations with GTranslate › Reply To: The search bar does not work in translations with GTranslate
May 29, 2025 at 12:22 pm
#54196
Keymaster
Hi,
Try this custom code snippet:
add_filter('asp/ajax/headers/content_type', function($content_type) {
return 'text/plain';
}, 99, 1);
Try adding this code via the Code Snippets plugin or to the functions.php file in your theme/child theme directory – make sure to have a full server back-up first for safety. For more details you can check the safe coding guidelines.
However the current implementation was recommended by GTranslate developers and should work as-is, so they probably changed something somewhere, as I’m seeing added HTML closing and opening tags littered into the response body – as well as some missing strings.