Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1038811

    Hi,

    In the link in PC below I am wanting to ‘nofollow’ the linked images to a new tab. Presently they only open in the same window which is not so great :(.

    Is this possible?

    Thanks
    John

    #1039110

    Hey John,

    Which elements are you referring to?

    Best regards,
    Victoria

    #1039205

    Hi Victoria,

    Yes that is coorect. The supplier images on the page that are hyperlinked (masonry gallery).

    Cheers
    John

    #1040161

    Hi John,

    Try adding this code at the bottom of your functions.php file:

    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');

    Hope it helps.

    Best regards,
    Nikko

    #1040507

    Awesome Nikko. Did the trick.

    Please close thread.

    Cheers
    John

    #1040637

    Hi John,

    Great, glad we could help and thanks for the update. Please open a new thread if you should have any further questions or problems.

    Best regards,
    Rikard

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Masonry gallery image nofollow linking to new tab’ is closed to new replies.