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

Reply To: result page

#39513
Ernest MarcinkoErnest Marcinko
Keymaster

Please note that custom coding is not actually part of our support. I will try to answer your questions, but I can’t promise anything regarding custom code.

The redirection to the results page (when assigned to a new window) is handled by a function. Maybe if you try to override that, it may actually work:

add_action('wp_footer', 'asp_add_footer_script_2', 9999);
function asp_add_footer_script_2() {
	?>
	<script>
	(function($){
		WPD.ajaxsearchpro.helpers.openInNewTab = function(url) {
                  Object.assign(document.createElement('a'), { target: 'iframe1', href: url}).click();
                }
	}(WPD.dom))
	</script>
	<?php
}

For this you also have to change the redirection to a new tab: https://i.imgur.com/KrUwaGP.png

However this may not work at all.