Title: Changing how images are grouped
Last modified: August 20, 2016

---

# Changing how images are grouped

 *  [MC](https://wordpress.org/support/users/mcsolas/)
 * (@mcsolas)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/changing-how-lightbox-works/)
 * I would like to automatically group all lightboxed images on the page automatically,
   even if they are in different posts. Right now I have it working where I have
   1 image per post showing medium size image), with a lightbox popup for the fullsize.
   Each image pops up with only that image, you have to exit then click the next
   one.
 * What I am describing can currently be seen here – until I figure this out 🙂
   
   [http://cabinetry-solutions.com/tag/standard-appliances/](http://cabinetry-solutions.com/tag/standard-appliances/)
 * I see the `rel=lightbox[123]` code in the page (the value differs for each image),
   it seems to be adding the page id here automatically when the file is linked 
   to because I don’t see it in the embedded html when I view the post source code.
 * I would like to override this behavior and always put the same value, say for
   example “group1” in the brackets:
    `rel=lightbox[group1]`
 * [http://wordpress.org/extend/plugins/lightbox-plus/](http://wordpress.org/extend/plugins/lightbox-plus/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [Dan Zappone](https://wordpress.org/support/users/dzappone/)
 * (@dzappone)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/changing-how-lightbox-works/#post-3266145)
 * You can do that. You just have to do it yourself and in your `<a>` element specify`
   rel=lightbox[group1]` for all the images.
 *  Thread Starter [MC](https://wordpress.org/support/users/mcsolas/)
 * (@mcsolas)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/changing-how-lightbox-works/#post-3266161)
 * That attribute is being set after the fact. I looked in the code and its not 
   there, only when the page is displayed there must be something that appends that
   to the a tag. It also seems to include the media file number with it or some 
   number which varies by image. I am trying to figure out where this happens so
   I can modify it slightly, set a fixed value instead:
 * what I see it doing roughly is this >
    rel=lightbox[$fileid]
 * changing that to >
    rel=lightbox[fixedstring]

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Changing how images are grouped’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/lightbox-plus_fafafa.svg)
 * [Lightbox Plus Colorbox](https://wordpress.org/plugins/lightbox-plus/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/lightbox-plus/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/lightbox-plus/)
 * [Active Topics](https://wordpress.org/support/plugin/lightbox-plus/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/lightbox-plus/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/lightbox-plus/reviews/)

## Tags

 * [grouping](https://wordpress.org/support/topic-tag/grouping/)

 * 2 replies
 * 2 participants
 * Last reply from: [MC](https://wordpress.org/support/users/mcsolas/)
 * Last activity: [13 years, 3 months ago](https://wordpress.org/support/topic/changing-how-lightbox-works/#post-3266161)
 * Status: not resolved