Created
January 9, 2017 07:05
-
-
Save antiden/cdd7344a7ce1825f04c8327d6c957a09 to your computer and use it in GitHub Desktop.
WP ACF 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'); ?> | |
<?php 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; ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment