Home Forums Add-ons Gallery Field Captions on lightboxed images


Captions on lightboxed images

  • hi,

    I used

    $images = get_field('image');
    if( $images ): ?>
            <?php foreach( $images as $image ): ?>
                	<a href="<?php echo $image['url']; ?>">
                		 <img src="<?php echo $image['sizes']['thumbnail']; ?>" alt="<?php echo $image['alt']; ?>" />
                    <p><?php echo $image['caption']; ?></p>
            <?php endforeach; ?>
    <?php endif; ?>

    for showing my gallery.

    I implemented this lightbox:
    $("a[href$='.jpg'], a[href$='.png'], a[href$='.jpeg'], a[href$='.gif']").attr('rel','gallery').fancybox();

    All runs ok.

    Buuut now I also need to show the caption under the image when it has been lightboxed.

    How could I do this?

    Found the solution here:

Viewing 1 post (of 1 total)

The topic ‘Captions on lightboxed images’ is closed to new replies.