Disable lightbox when on image click in Basic Slideshow
-
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?
-
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,
MihaiHi 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 }-
This reply was modified 7 years, 6 months ago by
Rafael Mendoza.
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 7 years, 3 months ago by
pfeeerdi.
Thanks for sharing Imagely! But does that option then hide the alt tags on the images?
-
This reply was modified 7 years, 2 months ago by
creativepassion.
-
This reply was modified 7 years, 6 months ago by
The topic ‘Disable lightbox when on image click in Basic Slideshow’ is closed to new replies.