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

Reply To: Unclickable images

#48715
Ernest MarcinkoErnest Marcinko
Keymaster

You are right, I think we need a different approach. Scratch that custom CSS, it’s not going to work.

Instead, I have constructed a custom code for you. This will basically override all clicks, but nothing else and prevent any redirection.

add_action('wp_footer', function() {
	?>
	<script>
	window.addEventListener("load", () => {
		document.querySelectorAll(".asp_main_container").forEach((el)=>{
			el.addEventListener("asp_results_show", ()=>{
				setTimeout(()=>{
					WPD.dom('.item').off().on('click touchstart', (event)=>{
						event.preventDefault();
					});
				}, 50);
			});
		});
	});
	</script>
	<?php
});

Try adding this code via the Code Snippets plugin or 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.