More photos from Magdeleine to illustrate the Magnific Popup Gallery.
I’m not going to duplicate everything in the tutorial from Tribeswell here, but I made enough modifications to the page template that this might be useful.
/*
Template Name: Page with Magnific Gallery
*/
add_action('genesis_entry_content', 'magnific_gallery_loop', 8);
function magnific_gallery_loop() {
$images = get_field('image_gallery');
if($images):
echo '<div class="popup-gallery">';
foreach( $images as $image ):
echo '<a href="'.$image['url'].'" class="lightbox-link" title="'. $image['caption'].'" data-description="'.$image['description'].'">';
echo '<div class="image-wrap"><img src="'.$image['url'].'"></div></a>';
endforeach;
echo '</div>';
endif;
}
genesis();