Home › Forums › Add-ons › Repeater Field › Insert in between repeater fields › Reply To: Insert in between repeater fields
Thanks for the swift reply John. The code example you posted work so long as there are exact multiples of 4 ‘Repeater Field Content’ blocks. Is it possible to modify the code so that the div elelments close where there are not 4, 8 or 12 and so on – so if (for example) there were only 5 blocks of ‘Repeater Field Content’ the divs are closed in the approriate place (as below)
<div><!–- outer container for 4 figure elements -–>
<div><!–- inner container for 2 of the 4 figure elements -–>
<figure>Repeater Field Content</figure>
<figure>Repeater Field Content</figure>
</div>
<div><!–- inner container for 2 of the 4 figure elements -–>
<figure>Repeater Field Content</figure>
<figure>Repeater Field Content</figure>
</div>
</div>
<div><!–- outer container for maximum of 4 figure elements -–>
<div><!–- inner container for up to 2 of the 4 figure elements -–>
<figure>Repeater Field Content</figure>
</div>
</div>
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.