• Ben Hutchings

    (@benmeredevelopmentcouk)


    Hi, We’re using Responsive Lightbox and have ‘Image Links’ enabled so that all images have Lightbox applied. However when we insert images into Advanced Custom Fields content areas, the rel tag isn’t added automatically.

    Is there a way / action / hook to make Responsive Lightbox work on ALL WordPress media images and not just ones that appear in standard Page or Post Content areas.

    Thanks!
    Ben

    https://wordpress.org/plugins/responsive-lightbox/

Viewing 1 replies (of 1 total)
  • sorry if I’m missing something, but what’s stopping you from adding the “rel” attribute yourself?

    Something like this:

    $image = get_field('my_image');
    <a href='<?php echo $image['url']; ?>' rel="lightbox"><img src="<?php echo $image['sizes']['medium']; ?>" alt="<?php echo $image['alt']; ?>" /></a>
Viewing 1 replies (of 1 total)
  • The topic ‘Adding Responsive Lightbox to images pulled from ACF fields’ is closed to new replies.