Support

Account

Home Forums Add-ons Gallery Field Captions on lightboxed images

Solved

Captions on lightboxed images

  • hi,

    I used

    $images = get_field('image');
     
    if( $images ): ?>
        <ul>
            <?php foreach( $images as $image ): ?>
                <li>
                	<a href="<?php echo $image['url']; ?>">
                		 <img src="<?php echo $image['sizes']['thumbnail']; ?>" alt="<?php echo $image['alt']; ?>" />
                	</a>
                    <p><?php echo $image['caption']; ?></p>
                </li>
            <?php endforeach; ?>
        </ul>
    <?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?
    thanks.

    Found the solution here: http://jsfiddle.net/cWNw9/

Viewing 1 post (of 1 total)

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