views:

146

answers:

1

Hi, how can I separate the gallery affected by 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

A: 

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.

  1. Edit lightbox-gallery.js and add some codes. Look at the comment of the file.
  2. Add a class into [gallery]. ex) [gallery class="gallery2"]

Tee

teepusink