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

Reply To: target="_blank" modification cannot take effect.

Home Forums Product Support Forums Ajax Search Pro for WordPress Support target="_blank" modification cannot take effect. Reply To: target="_blank" modification cannot take effect.

#39461
Ernest MarcinkoErnest Marcinko
Keymaster

Okay, let’s try it programmatically then via 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', 'asp_add_footer_script', 99999);
function asp_add_footer_script() {
	?>
	<script>
	(function($){
		$(".asp_m").on("asp_results_show", function() { 
			setTimeout(function(){
				$('.asp_r .item').off();
				$(this).find('.asp_res_url').off();
				$('.asp_r .item').on('click', function(e){
					$(this).find('.asp_res_url').get(0).click();
				});
			}, 100);
		});
	})(WPD.dom)
	</script>
	<?php
}