You should have to create a sub repeater field(lets call box_service
) inside the repeater field services_sections
. Then create the sub fields (services_icon, service_title, services_description
)inside box_service
repeater field. (please check attachment))
then use below code :
<section class="services cf">
<div class="wrapper">
<?php if( have_rows('services_sections') ):
while( have_rows('services_sections') ): the_row(); ?>
<div class="service">
<?php if( have_rows('box_service') ):
while( have_rows('box_service') ): the_row();
// vars
$image = get_sub_field('services_icon');
$title = get_sub_field('service_title');
$description = get_sub_field('services_description');
?>
<div class="box-service">
<div class="pull-left">
<img src="https://wordpress.stackexchange.com/questions/240747/<?php echo $image["url']; ?>" alt="https://wordpress.stackexchange.com/questions/240747/<?php echo $image["alt'] ?>" />
</div>
<div class="line"></div>
<div class="right-word">
<h3><?php echo $title; ?></h3>
<p><?php echo $description; ?></p>
</div>
</div>
<?php endwhile; endif; ?>
</div>
<?php endwhile; endif; ?>
</div>