[Plugin: Lightbox Gallery] Separating multiple galleries from different posts on the same page
-
I had a bit of an issue where multiple posts with lightbox galleries in each one would combine all of the galleries once the lightbox was activated.
While you can fix it by adding a class to each gallery shortcode:
[gallery class="foo"]
I didn’t want to add a class to each gallery manually, so I dug into /wp-content/plugins/lightbox-gallery/lightbox-gallery.php and found this on line 520:
'class' => 'gallery1',
You can just change
'gallery
‘ to anything else, but I decided to use the post ID:'class' => "'" . $post->ID . "'",
Fixed ‘er right up!
I documented it on my blog, in case you were interested or if you have any other questions.
- The topic ‘[Plugin: Lightbox Gallery] Separating multiple galleries from different posts on the same page’ is closed to new replies.