<?php if( have_rows('about') ): ?>
<?php while( have_rows('about') ): the_row(); ?>
<?php if( have_rows('about_left') ): ?>
<?php while( have_rows('about_left') ): the_row();
$about_image = get_sub_field('about_image');
$about_name = get_sub_field('about_name');
$about_text = get_sub_field('about_text');
?>
<figure class="about-figure">
<?php if ($about_image): ?>
<img class="about-image" src="<?= esc_url($about_image); ?>" alt="<?= esc_attr($about_name); ?>">
<?php endif; ?>
<figcaption class="about-figcaption">
<span class="about-figcaption-title"><?= esc_html($about_name); ?></span>
<span class="about-figcaption-text"><?= esc_html($about_text); ?></span>
</figcaption>
</figure>
<?php endwhile; ?>
<?php endif; ?>
<?php if( have_rows('about_right') ): ?>
<?php while( have_rows('about_right') ): the_row();
$about_title = get_sub_field('about_title');
$about_content_1 = get_sub_field('about_content_1');
$about_content_2 = get_sub_field('about_content_2');
$about_content_3 = get_sub_field('about_content_3');
?>
<div class="about-caption-wrapper">
<div class="about-caption">
<h2 class="heading-2"><?= esc_html($about_title); ?></h2>
<p class="about-caption-text"><?= esc_html($about_content_1); ?></p>
<p class="about-caption-text"><?= esc_html($about_content_2); ?></p>
<p class="about-caption-text"><?= esc_html($about_content_3); ?></p>
</div>
</div>
<?php endwhile; ?>
<?php endif; ?>
<?php endwhile; ?>
<?php endif; ?>
Leave a Reply