Hi Jordy
Thanks for your message.
the two domains are
https://jacobitescotland.org/explore/castle-menzies/
and
https://dpyachting.com/yachts/princess-56-2017/
For some reason this thread has been marked as resolved but unfortunately it’s not working on either.
I’m not sure I could replicate the issue.
For both sites it’s the latest WP and PHP Version 7.4.30
I have tried adding all of these as selectors but the meow classes that trigger the lightbox just never get added to the images and I can’t work out why
Yachting:
.the-image, .the-image img, .the-image a, .preview-image-container, .preview-image-container img, .listing-preview-gallery
Jacobite:
.gallery, .gallery-image
I disabled every plugin except the ones I had to have in order to display the images which are Advanced Custom fields, FacetWP and scroll triggered animations (I already tested scroll triggered animations by disabling the plugin and undoing the classes that initially hid the gallery items)
The code that displays the gallery on the yachting site is
<div class="preview-images-container">
<?php $gallery_images = get_field( 'gallery' ); ?>
<?php if ( $gallery_images ) : ?>
<?php foreach ( $gallery_images as $gallery_image ): ?>
<div id="preview-image-container">
<div class="the-image">
<a href="<?php echo esc_url( $gallery_image['url'] ); ?>">
<img src="<?php echo esc_url( $gallery_image['sizes']['medium'] ); ?>" alt="<?php echo esc_attr( $gallery_image['alt'] ); ?>" />
</a>
</div>
</div>
<?php endforeach; ?>
<?php endif; ?>
</div>
And for the Jacobite website
<?php if( get_field( 'gallery' ) ) :
$images = get_field( 'gallery' );
$size = 'full'; // (thumbnail, medium, large, full or custom size) ?>
<div class="gallery">
<?php foreach( $images as $image_id ): ?>
<div class="gallery-image">
<?php echo wp_get_attachment_image( $image_id, $size ); ?>
</div>
<?php endforeach; ?>
</div>
<?php endif; ?>
If that is of any help
Thanks again for your help
-
This reply was modified 2 years, 4 months ago by shereew.
-
This reply was modified 2 years, 4 months ago by shereew.