Save up to 25% on pro security plugins w/ our Security Bundle »
Web Dev + WordPress + Security

Lightbox Notes

To add Lightbox functionality to any single image:

  1. Add rel="lightbox" to the anchor tag.
  2. Add a title="" attribute to the anchor tag.
  3. Add an alt="" attribute to the image tag.

To add Lightbox functionality to any series of images:

  1. Add rel="lightbox[value]" to the anchor tag of each image.
  2. Add a title="" attribute to the anchor tag of each image.
  3. Add an alt="" attribute to the image tag of each image.
  4. Any set of pictures with the same rel="lightbox[value]" will display with nav buttons.

Jeff Starr
About the Author
Jeff Starr = Designer. Developer. Producer. Writer. Editor. Etc.
Digging Into WordPress: Take your WordPress skills to the next level.

2 responses to “Lightbox Notes”

  1. What causes dotted/dashed lines to show across the images while being displaying in lightbox once next or previous is selected?

    Is there a fix for this?

  2. Avatar photo

    What do the lines look like? My ability to help you would be greatly improved if you were to provide a link to a page that demonstrates the issue you are describing.

Comments are closed for this post. Something to add? Let me know.
Welcome
Perishable Press is operated by Jeff Starr, a professional web developer and book author with two decades of experience. Here you will find posts about web development, WordPress, security, and more »
The Tao of WordPress: Master the art of WordPress.
Thoughts
Fall season almost here :)
My greatest skill on social media is the ability to simply ignore 98% and keep scrolling without interacting.
Enjoying this summer, getting some great positive energy. Refreshing and inspiring.
☀️ Pro plugin giveaway! Enter to win 1 of 4 lifetime licenses for our WordPress security plugins, including 10-site Security Bundle!
There is no end to what humans can achieve when they work together.
Excellent (and free) tool to test your site's SSL configuration.
Plugin updates! All of our free and pro plugins ready for WordPress 6.2.
Newsletter
Get news, updates, deals & tips via email.
Email kept private. Easy unsubscribe anytime.