Home › Forums › Add-ons › Repeater Field › Every row in an own DIV › Reply To: Every row in an own DIV
<?php
if (have_rows("anwaelte")):
while (have_rows("anwaelte")): the_row();
?>
<div class="box_anwaelte">
<?php
// vars
$employeeName = get_sub_field("name_des_anwalts");
$employeeImage = get_sub_field("bild_des_anwalts");
$employeeContent = get_sub_field("schwerpunkte_des_anwalts");
?>
<h2><?php echo $employeeName; ?></h2>
<img class="img_anwaelte" alt="Bild von <?php
echo $employeeName; ?>" src="<?php echo $employeeImage; ?>">
<br>
<?php echo $employeeContent; ?>
</div>
<?php
endwhile;
endif;
?>
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.