Tagged: Portfolio
In my portfolio items I have set to “define custom link”. On a page where I want to display the portfolio items I have used the portfolio grid and set Link Handling to “open the entry on a new page”. When clicking on the portfolio item on frontend it opens the link in the same window. How can I get the link to open in a new tab/page? The answers in this forum didn’t work for me.
Hey Emrah!
Can you please try de-activating all active plugins and check if that helps?
Cheers!
Yigit
Hey Yigit,
Still doesn’t work for me. I de-activated all the plugins and it still didnt work. I hope you can help me.
Hey!
Add this to the functions.php file:
add_action('wp_footer', 'ava_grid_target');
function ava_grid_target(){
?>
<script>
(function($){
$(".grid-image").each(function() {
$(this).attr('target', '_blank');
});
})(jQuery);
</script>
<?php
}
Best regards,
Ismael
Still doesn’t work! I will change the layout of this page, because it doesn’t work for me. Thanks anyway.