Hi,
How can I open the custom link in a new window?
Thanks in advance
Hi imc-html!
Try adding this code in functions.php:
function add_custom_target(){
?>
<script>
jQuery(window).load(function(){
jQuery('.av-masonry-container a').attr('target', '_blank');
});
</script>
<?php
}
add_action('wp_footer', 'add_custom_target');
Let us know if it works :)
Regards,
Nikko
Hi Nikko,
thank you for your quick response.
I use the portfolio grid, so I changed the class av-masonry-container
function add_custom_target(){
?>
<script>
jQuery(window).load(function(){
jQuery(‘.av_one_fourth a’).attr(‘target’, ‘_blank’);
});
</script>
<?php
}
add_action(‘wp_footer’, ‘add_custom_target’);
It works great
Thank you very much
Christopph
Hi,
Glad we could help!
We really appreciate it if you rate our theme on themeforest, Thank you for using Enfold :)
Best regards,
Nikko