how can I separate the gallery affected 开发者_如何学JAVAby the lightbox gallery plugin by per post basis?
Right now what's happening is say I have 2 posts. Post 1 has 3 images which I turn into a gallery Post 2 has 5 images which I turn into a gallery
Now when I click 1 of the images on post 1, it does open the lightbox gallery as expected. However, the total images says 1 of 8 and I'm able to loop through the images from Post 2 as well. How can I prevent that?
Thank you, Tee
Oh man, I just find the answer.
You need to do two steps. If you would like to handle galleries separately, add different class names into [gallery] and add codes as many as class names into lightbox-gallery.js.
- Edit lightbox-gallery.js and add some codes. Look at the comment of the file.
- Add a class into [gallery]. ex) [gallery class="gallery2"]
Tee
精彩评论