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

    I have a problem.
    How to disable the image thumbnail link open in new tab?
    Earlier time I managed to disable the big image link with custom css
    `
    .avia-gallery .avia-gallery-big {
    pointer-events: none;
    cursor: default;
    }
    Please advise how I resolve this problem with css.
    Thank you

    #719462

    Hey!

    Please change your code to following one

    
    .avia-gallery-thumb ,.avia-gallery .avia-gallery-big {
    pointer-events: none;
    cursor: default;
    }

    Best regards,
    Yigit

    #719614

    Hi Yigit,

    Thank you but it seems all thumbnails become static.
    What I want to achieve is, when I click the thumbnails, I can see large image above, and they can not be opened in new window or tab.

    Can you please recheck?

    Regards

    Eric

    #719738

    Hi,

    Please try adding following code to Functions.php file in Appearance > Editor

    function remove_href_attr(){
    ?>
     <script>
    jQuery(window).load(function(){
    jQuery('#top #wrap_all .avia-gallery .avia-gallery-thumb a').removeAttr('href');
    });
     </script>
    <?php
    }
    add_action('wp_footer', 'remove_href_attr');

    Best regards,
    Yigit

    #719986

    It works!
    Thank you very much!

    #720154

    Hi,

    Great, glad we could help :-)

    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 ‘How to disable the thumbnail image link in Gallery?’ is closed to new replies.