This topic has 2 replies, 2 voices, and was last updated 4 months, 1 weeks ago ago by Luca Rossi
Hi,
On the shop page, home page or other pages etc, I want the product to open in a new window after clicking on it.
How do I do?
Thank you.
Hi @Sam,
To achieve that, please add the following code under functions.php file locates in your child theme:
add_action('wp_footer', 'n2t_wp_footer');
function n2t_wp_footer(){
?>
<script>
jQuery( function($){
$(document).ready(function(){
$('.etheme-product-grid-title a, .etheme-product-grid-image a').attr('target', '_blank');
})
});
</script>
<?php
}
Hope it helps!
You must be logged in to reply to this topic.Log in/Sign up