PrettyPhoto not working for multiple galleries on same page
-
Dear Support,
I am running into problems with prettyPhoto when using multiple galleries on one page. I should mention that there are no problems if I instead select any of the other Lightbox Script in General Settings, i.e. SwipeBox, FancyBox, Nivo Lightbox, Image Lightbox and TosRUs.
If I select prettyPhoto, then the Lightbox will not be enabled and WordPress regular media link will be loaded instead of the prettyPhoto lightbox.
I am using Responsive Lightbox Version 1.6.3 with the latest WordPress.
These are some related settings that works for all lightboxes, except for prettyPhoto:
General Settings > Selector is set to lightbox.
General Settings > Image links is unchecked
General Settings > Single images as gallery is unchecked
General Settings > Galleries is uncheckedThe HTML looks like:
<a href="image1.jpg” rel="lightbox-gallery-1" data-rel="lightbox-gallery-1"><img src=“thumb1.jpg” /></a> <a href="image2.jpg" rel="lightbox-gallery-1" data-rel="lightbox-gallery-1"><img src="thumb2.jpg" /></a> <a href="image3.jpg" rel="lightbox-gallery-1" data-rel="lightbox-gallery-1"><img src="thumb3.jpg" /></a> <a href="image4.jpg" rel="lightbox-gallery-2” data-rel="lightbox-gallery-2”><img src="thumb4.jpg" /></a> <a href="image5.jpg" rel="lightbox-gallery-2” data-rel="lightbox-gallery-2”><img src="thumb5.jpg" /></a> <a href="image6.jpg" rel="lightbox-gallery-2” data-rel="lightbox-gallery-2”><img src="thumb6.jpg" /></a>
It appears to me that the problem is with the Selector when using prettyPhoto, as follows:
– Setting the Selector to the standard correct value lightbox, does not work.
– If I for example incorrectly set the Selector to lightbox-gallery-1, then the prettyPhoto lightbox will work fine on the first gallery, but not on the second.
– And setting the Selector to lightbox-gallery-2, obviously will only enable the prettyPhoto lightbox for gallery 2, but will not work for gallery 1.So obviously your code is having problem to locate the corresponding rel/data-rel images unless the Selector is set to exactly match the rel/data-rel value.
As I mentioned, this problem only occurs for prettyPhoto.
It does not seem to be a theme-issue or conflicting plugins as I’ve tried other themes and deactivated plugins.
Any suggested solution?
Cheers
- The topic ‘PrettyPhoto not working for multiple galleries on same page’ is closed to new replies.