Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1079578

    Hi enfold

    Just wondering if you can help me out. I want all the images on this page to have the no follow attribute added.

    Page is https://www.suttonparkblackpool.co.uk/useful-information/

    You can see all the images and outbound links for each needs to be no follow. I saw this post

    https://kriesi.at/support/topic/nofollow-links-for-masonry-gallery/

    Where Yigit provided a solution function for the masonry. I was wondering if you can be kind enough to provide one for these individual images.

    #1079703

    Hey codecreative,
    Try adding this code to the end of your functions.php file in Appearance > Editor:

    function avia_image_nofollow(){
    ?>
     <script>
    jQuery(window).load(function(){
    jQuery('.page-id-743 a.avia_image').attr('rel','nofollow');
    });
    </script>
    <?php
    }
    add_action('wp_footer', 'avia_image_nofollow');

    Best regards,
    Mike

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.