Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #20656
    bluegoo5e
    Participant

    Hi,

    I’ve added the above to our img tags in our php template files so it looks like the below:

    <img src="<?php the_sub_field('project_image'); ?>" data-rel=”lightbox”>

    I’ve selected the option “Force lightbox” but the lightbox is not working on image files on our pages.

    Can you help at all?

    #20684
    Bartosz
    Keymaster

    Yes, the lightbox is a larger image opened when you click on a thubnail – so it has to be a link, not just an image. For example:

    <a href="<?php the_sub_field('project_image'); ?>" data-rel="lightbox"><img src="<?php the_sub_field('project_image'); ?>"><?php the_sub_field('project_thumbnail'); ?></a>

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.