Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Disabling Live Search while Typing also disables auto suggest phrase click. › Reply To: Disabling Live Search while Typing also disables auto suggest phrase click.
May 19, 2021 at 3:22 pm
#33312
Keymaster
Well, the only way is using a custom code. Try adding this code 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.
add_action('wp_footer', 'wp_footer_asp_trigger_on_suggest');
function wp_footer_asp_trigger_on_suggest() {
?>
<script>
jQuery(function($) {
$('body div').on('click', '.asp_keyword', function(){
console.log('on');
ASP.api(
$(this).closest('.asp_r').data('id'),
$(this).closest('.asp_r').data('instance'),
'searchRedirect',
$(this).text()
);
});
});
</script>
<?php
}
Unfortunately I can not guarantee this is going to work in all cases.