This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

Reply To: searching for term which does not exist breaks system

Home Forums Product Support Forums Ajax Search Pro for WordPress Support searching for term which does not exist breaks system Reply To: searching for term which does not exist breaks system

#38609
Ernest MarcinkoErnest Marcinko
Keymaster

Okay, try this variation isntead:

add_action('wp_footer', 'asp_footer_custom_script', 999999);
function asp_footer_custom_script() {
	?>
	<script>
	jQuery(function($){
		$('.prosettings').one('click', function(){
			$('.asp_option_cat').on('click', function(){
				$('.asp_m').on('asp_search_end', function(){
					location.href = location.href;
				});
			});
		});
	});
	</script>
	<?php
}

This one seems to work okay when I test it via the console. It will wait until the search is finished, then do the refresh.