Created
April 8, 2014 17:00
-
-
Save aaronranard/10156266 to your computer and use it in GitHub Desktop.
WordPress: ACF - Output Gallery
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$images = get_field('gallery'); | |
if( $images ): ?> | |
<div id="slider" class="flexslider"> | |
<ul class="slides"> | |
<?php foreach( $images as $image ): ?> | |
<li> | |
<img src="<?php echo $image['url']; ?>" alt="<?php echo $image['alt']; ?>" /> | |
<p><?php echo $image['caption']; ?></p> | |
</li> | |
<?php endforeach; ?> | |
</ul> | |
</div> | |
<?php endif; ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment