hey there,
i want to use the masonry gallery with linktarget “blank” just on one site (“Home”)
i found the snippet to use it for the child functions.php.
but the target in the masonry galleries on the other sites should be stay by default (same tab)
is there a solution?
Hi volmering!
Please add following code to Functions.php file in Appearance > Editor
function add_custom_target(){
?>
<script>
jQuery(window).load(function(){
jQuery('.home .av-masonry a').attr('target','_blank');
});
</script>
<?php
}
add_action('wp_footer', 'add_custom_target');
Cheers!
Yigit
man, that was the quickest answer ever!!!!! thx alot :-)
great job