• I am using Ajax Load More to retrieve images, How could I use lightbox when images are clicked? Help is appreciated. Thanks!

    <div class="alm-gallery-img">
       <a href="<?php echo $image ?>" target="_blank" class="popup">
          <img src="<?php echo $image?>"/ data-lazy="true" style="" class="loaded">
       </a>
    </div>
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Arno Welzel

    (@awelzel)

    All image links must be processed by the backend which needs to add additional data attributes to the <a> element. Just compare that with existing images. The minimum attributes needed are:

    data-lbwps-width – image width in px
    data-lbwps-height – image height in px

    Without these attributes, the frontend will ignore the link.

    Thread Starter bonumaster

    (@bonumaster)

    Hi. This is the output html

    <a href="https//images.jpg" data-slb-active="1" data-slb-asset="1390835579" data-slb-group="61216" data-lbwps-width="720" data-lbwps-height="720" data-lbwps-srcsmall="https://images.jpg"> 
    
    <img src="https://images.jpg" data-lazy="true" style="" class="loaded"> 
    
    </a>
    
    

    What could we do to make it effective?
    (Images links were removed due to privacy)

    Thanks for the response.

    Plugin Author Arno Welzel

    (@awelzel)

    The code above should be ok. What exactly is your problem? Do you have an example website to demonstrate the problem?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Open lightbox via PHP code’ is closed to new replies.