Support

Account

Home Forums Add-ons Gallery Field Opening a gallery slideshow in lightbox

Solving

Opening a gallery slideshow in lightbox

  • Hi Elliot,
    I’m using the Gallery add-on and would like to open a gallery slideshow in a PrettyPhoto lightbox. I was able to add the lightbox with the following href in front of your code, but only one image will display at a time inside the modal window. Is there any way to display the entire gallery within a lightbox?

    Here’s my code…

    <?php $images = get_field('sidebar_gallery'); 								 
    if( $images ): ?>
    <div id="slider" class="flexslider">
    <ul class="slides">
    	<?php foreach( $images as $image ): ?>
    	<li>
    	<a href="<?php echo $image['url']; ?>" rel="prettyPhoto"><img src="<?php echo $image['url']; ?>" alt="<?php echo $image['alt']; ?>" /></a>
    	<?php echo $image['caption']; ?>
    
    	</li>
    <?php endforeach; ?>
    </ul>
    </div>
    <?php endif; ?>

    Thanks for your help.

  • I reckon you’ll want to use an actual jquery gallery display for this like flexslider2 and use the acf gallery field just to feed it images. then open the jquery gallery in a modal. because the acf gallery fields arent going to format it into a slideshow on the frontend by themselves.

  • Hi guys

    Yes, just to clarify. ACF will hande all the PHP and allow you to create HTML markup on your theme. It won’t, however, write any jQuery to create interactive lightboxes.

    This is the part of the front end web developer.

    Thanks
    E

  • Hey Marindee – am trying to accomplish the same thing and wondering how you ending up solving this?

    thnx!
    -jennyb

Viewing 4 posts - 1 through 4 (of 4 total)

The topic ‘Opening a gallery slideshow in lightbox’ is closed to new replies.