Last active
October 6, 2017 14:55
-
-
Save dauble/de5d78d1105dd672525fd9be86750b69 to your computer and use it in GitHub Desktop.
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
<ul class="employees__list"> | |
<?php $counter = 1; ?> | |
<?php while(have_rows('employee')): the_row(); ?> | |
<li class="employees__list__employee<?php if($counter % 2 ==0){ echo ' even'; }?>"> | |
<?php $image = wp_get_attachment_image_src(get_sub_field('image'), 'bio-pic'); ?> | |
<div class="employees__list__employee--image"> | |
<?php if($image): ?> | |
<img src="<?php echo $image[0]; ?>" alt="" class="img-responsive"> | |
<?php else: ?> | |
<img src="http://via.placeholder.com/600x600" alt="" class="img-responsive"> | |
<?php endif; ?> | |
</div> | |
<div class="employees__list__employee__content"> | |
<div class="employees__list__employee__content--wrap"> | |
<h4 class="employees__list__employee__content--name"><?php echo get_sub_field('name'); ?></h4> | |
<h5 class="employees__list__employee__content--title"><?php echo get_sub_field('title'); ?></h5> | |
<p class="employees__list__employee__content--quote"><?php echo get_sub_field('quote', false); ?></p> | |
</div> | |
</div> | |
</li> | |
<?php $counter++; endwhile; ?> | |
</ul> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This resolves the problem: