Created
November 9, 2013 09:09
-
-
Save ejntaylor/7383461 to your computer and use it in GitHub Desktop.
ACF and Flexslider Repeater with Image
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="home-slide flexslider"> | |
<?php if(get_field('home_slide_repeater')): ?> | |
<ul> | |
<?php while(has_sub_field('home_slide_repeater')): ?> | |
<li> | |
<?php $image = wp_get_attachment_image_src(get_sub_field('home_slide_image'), 'home-slide'); ?> | |
<?php $thumb = wp_get_attachment_image_src(get_sub_field('home_slide_image'), 'thumbnail'); ?> | |
<img src="<?php echo $image[0]; ?>" alt="<?php the_sub_field('home_slide_image');?>" rel="<?php echo $thumb[0]; ?>" /> | |
<div class="hero-slide-content"> | |
<h2><?php the_sub_field('home_slide_quote'); ?></h2> | |
<p><?php the_sub_field('home_slide_author'); ?></p> | |
</div> | |
</li> | |
<?php endwhile; ?> | |
</ul> | |
<?php endif; ?> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment