Created
November 30, 2016 18:59
-
-
Save amanhstu/967bf313ab270e18f8cf7d4568256885 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 if( have_rows('repeater_field_name') ): ?> | |
<ul class="slides"> | |
<?php while( have_rows('repeater_field_name') ): the_row(); | |
// vars | |
$image = get_sub_field('image'); | |
$content = get_sub_field('content'); | |
$link = get_sub_field('link'); ?> | |
<li class="slide"> <?php if( $link ): ?> | |
<a href="<?php echo $link; ?>"> | |
<?php endif; ?> | |
<img src="<?php echo $image['url']; ?>" alt="<?php echo $image['alt'] ?>" /> | |
<?php if( $link ): ?> | |
</a> | |
<?php endif; ?> | |
<?php echo $content; ?> | |
</li> | |
<?php endwhile; ?> | |
</ul> | |
<?php endif; ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment