Ready to get started?Download WordPress


how to add rel="lightbox" to gallery images (2 posts)

  1. miocene22
    Posted 4 years ago #

    I have lightbox installed that displays the lightbox image effect when a user clicks on an image thumbnail...

    However when I add a gallery in wordpress I can't use the lightbox effect as it doesn't add the rel=lightbox code and I can't edit the html manually as it uses wordpress shortcode.

    How can I have it so i can use lightbox on my wordpress galleries??

    EDIT: also the wordpress gallery adds a <style> tag just before the gallery containing styles. This ruins w3c validation as style tags are only allowed in <head>. Why does it do this and is there a better way??

  2. rickmesser
    Posted 3 years ago #

    I'm actually looking around for a way to add the REL attribute to a gallery as well, but for now, you should check out this plugin:


    Really nice and customizable. I just am trying to figure out how to add the REL attribute to galleries so I can have more than 1 gallery on a page.

    Let me know if you find a solution please!


Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.