Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Pressing the return button doesn't work › Reply To: Pressing the return button doesn't work
January 27, 2022 at 10:04 am
#36417
Keymaster
Actually, it could be possible.
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', 'asp_add_footer_script');
function asp_add_footer_script() {
?>
<script>
(function($){
$('input.orig').on('keyup', function(e){
if (e.which == 13) {
ASP.api(1, 1, 'searchFor', $(this).val());
}
});
}(WPD.dom));
</script>
<?php
}