2020-12-17 14:35:39 +01:00
< ol >
2026-03-31 11:30:59 +02:00
< li > You can use WordPress image galleries and have them grouped and auto-lightboxed: < a href = "https://codex.wordpress.org/Gallery_Shortcode" > < code > [gallery link="file"]< / code > < / a > < / li >
2020-12-17 14:35:39 +01:00
< li > You can also add a < code > rel="lightbox"< / code > attribute to any link tag to activate the lightbox. For example:
< pre > < code > < a href=" images/image-1.jpg" rel=" lightbox" title=" my caption" > image #1< /a> < / code > < / pre >
< em > Optional:< / em > Use the < code > title< / code > attribute if you want to show a caption.
< / li >
< li > If you have a set of related images that you would like to group, simply include a group name in the rel attribute. For example:
< pre > < code > < a href=" images/image-1.jpg" rel=" lightbox[roadtrip]" > image #1< /a>
< a href=" images/image-2.jpg" rel=" lightbox[roadtrip]" > image #2< /a>
< a href=" images/image-3.jpg" rel=" lightbox[roadtrip]" > image #3< /a> < / code > < / pre >
No limits to the number of image sets per page or how many images are allowed in each set. Go nuts!< / li >
< li > To < strong > disable< / strong > lightboxing of an image link, just set any other rel-attribute: < code > rel="nobox"< / code > < / li >
< / ol >