Support » Plugin: WordPress Gallery Plugin - NextGEN Gallery » Disable lightbox when on image click in Basic Slideshow

  • Resolved Rafael Mendoza

    (@raffywpg)


    Hi, im using the free version of the NextGen gallery plugin to display gallery images using shortcode ([slideshow id=2]). Before updating to the latest version, the images transition to next image when the image is clicked. After updating to newest version, the image popup to a lightbox which I don’t like. I like the way the image gallery works before that it slide to the next image on image click. Is there any way to do that?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Imagely

    (@imagely)

    Hi @raffywpg,

    I would be happy to help. Please add the following CSS rule to “Gallery -> Other Options -> Styles” in order to disable the lightbox’ trigger for the Basic Slideshow images:

    .ngg-slideshow .ngg-gallery-slideshow-image img {
    pointer-events: none !important;
    }

    Best Regards,
    Mihai

    Thread Starter Rafael Mendoza

    (@raffywpg)

    Hi Mihai,

    thank you. I found out that NGG use slick slider as the new JS engine so I figured out a way to make it work like the old Basic slider using this code:

    //* Add script to make the slideshow fade next when clicked just like the old slider
    add_action('wp_footer', 'hikesed_ngg_slideshow_nextslide');
    function hikesed_ngg_slideshow_nextslide(){
    	?>
    
    	<script>
    		(function($) {
    			//remove a parent tag from ngg slideshow images
    			$('.ngg-gallery-slideshow-image img').each(function(){
    				$(this).unwrap('a');
    			});
    			// add slide next when the image is clicked to replicate the old ngg slideshow function
    			$('.ngg-slideshow').click(function(){
    				$('.ngg-slideshow').slick('slickNext');
    			});
    		})( jQuery );
    	</script>
    
    	<?php
    }

    Where did you paste the script? I am really new to this! Therefore I would appreciate a little help 🙂

    Edit: Never mind! Got it working! You have a script that adds the description under each picture aswell?

    • This reply was modified 2 years, 5 months ago by pfeeerdi.

    Thanks for sharing Imagely! But does that option then hide the alt tags on the images?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Disable lightbox when on image click in Basic Slideshow’ is closed to new replies.