• Resolved 3dmaxer

    (@3dmaxer)


    Is there any way to not display the light-box icon that appears on the lower right of the picture, but keep the functionality?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author NikHiL Gadhiya

    (@nikhilgadhiya)

    Hello,

    Yes, it’s possible. We just need to add a small JavaScript snippet to trigger the lightbox on image click and then hide the icon using CSS.

    Please add following code to function.php file of your active theme.
    If you want to add a code snippet without having to edit your theme’s functions.php file? Use a use Code Snippets plugin instead.

    add_action('wp_footer','nickx_wp_footer_callback');
    function nickx_wp_footer_callback() {
    if( is_product() ) { ?>
    <script type="text/javascript">
    jQuery(".nickx-slider.nickx-slider-for").on('click','.nswiper-slide-active img', function(e){
    jQuery('.nickx-slider.nickx-slider-for .nswiper-slide-active span').click();
    return false;
    });
    </script>
    <style type="text/css">
    .nswiper-slide-active span{
    opacity: 0 !important;
    visibility: hidden !important;
    }
    </style>
    <?php
    }
    }


    Thank You.

    Thread Starter 3dmaxer

    (@3dmaxer)

    That worked, thank you.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Hide Light-box icon’ is closed to new replies.