Show Gallery Image As Slider And Add Class

<?php $images2 = get_field(‘slider_gallery’,$post->ID); $count=1;
if( $images2 ):
$counter = 0;
?>

<?php foreach( $images2 as $image2 ): ?>
<?php $class = ”;
if(++$counter == 1) {
$class = ‘active’;
}
else {
$class == ”;
}

?>

<?php echo $class ; ?>”>

“<?php echo $image2[‘slider_image’]; ?>” alt=”” />

<h4><?php echo $image2[‘slider_heading’]; ?></h4>
<p><?php echo $image2[‘slider_text’]; ?></p>

<?php endforeach; ?>
<?php endif; ?>

Advertisements

Show Content ACF From Repeter Field

<?php
$images = get_field(‘profile_image_gallery’);
if( $images ): ?>
<?php foreach( $images as $image ): ?>
src=”<?php echo $image[‘url’]; ?>” width=”150″ height=”150″ alt=””
<?php endforeach; ?>
<?php endif; ?>