• Resolved RayBoyd1455

    (@rayboyd1455)


    I thought this would work in a gallery but the gallery images just link to the attachment page for each image. I tried adding the attribute to the gallery shortcode with no luck;
    [gallery ids="2726,2727,2728" rel="wpdevart_lightbox"]
    I tried copying the html code for the gallery from the page it displayed on and adding the attribute to each image link but that just opened a blank popup box.

    • This topic was modified 4 years, 3 months ago by RayBoyd1455.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author wpdevart

    (@wpdevart)

    Hi dear user.

    You need to add the rel attribute to the image URL. For example,

    <a href="https://test.test/wp-content/uploads/2015/12/121.jpg" rel="wpdevart_lightbox"><img width="150" height="150" src="https://test.test/wp-content/uploads/2015/12/121-150x150.jpg""></a>

    Thanks.

    Thread Starter RayBoyd1455

    (@rayboyd1455)

    Thank you for your quick reply, I was asking about WordPress galleries, not individual image links. This is a gallery shortcode in WordPress;
    [gallery ids="2726,2727,2728"]

    I would like the images in the gallery to open in a lightbox rather than the default, to link to the image’s attachment page.

    I tried adding your rel attribute to the gallery shortcode;
    [gallery ids="2726,2727,2728" rel="wpdevart_lightbox"]

    That did not work, what can I do to make this work?

    Plugin Author wpdevart

    (@wpdevart)

    Hi dear user.

    Unfortunately, at this moment our plugin isn’t integrated with galleries. It’s not a simple customization, so at this point we don’t know if we can add this functionality.

    Thanks.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Can This Work With a WordPress Gallery?’ is closed to new replies.