I would like that the “Link portfolio item to external URL” open in a new window (like _blank attribute).
I have tried several scripts that I have found in different tickets, but none seem to work.
Best regards
Oriano
I try to explain better…
On the “Additional Portfolio Settings” panel, I have add a “Link portfolio item to external URL” (see image).
I would like that this link open the URL in a blank window.
Is this possible?
Best regards
Oriano
Hi Oriano,
Here is the code you can put in your funtions.php
function add_custom_target(){
?>
<script>
jQuery(window).load(function(){
jQuery('a.av-masonry-entry.portfolio').attr('target', '_blank');
});
</script>
<?php
}
add_action('wp_footer', 'add_custom_target');
If you need further assistance please let us know.
Best regards,
Victoria
Hello Victoria,
thanks for your help.
Your code solves my “problem” 🙂
Best regards,
and thanks to alla Kriesi staff.
Oriano