Created
October 23, 2014 10:39
-
-
Save mattradford/205ad73d971adc43e9e0 to your computer and use it in GitHub Desktop.
ACF flexslider with carousel and image caption overlay
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
<div class="flexslider-home"> | |
<ul class="slides"> | |
<?php while( have_rows('image_slider') ): the_row(); | |
$imageArray = get_sub_field('image'); | |
$imageURL = $imageArray['sizes']['large']; | |
$imageThumb = $imageArray['sizes']['thumbnail']; | |
$imageCap = $imageArray['caption']; | |
?> | |
<li style="background-image: url('<?php echo $imageURL;?>');" data-thumb="<?php echo $imageThumb;?>"> | |
<?php if($imageCap) : ?> | |
<p class="flex-caption"><?php echo $imageCap; ?></p> | |
<?php endif; ?> | |
</li> | |
<?php endwhile; ?> | |
</ul> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment