Home › Forums › Add-ons › Repeater Field › repeater field in gutenberg › Reply To: repeater field in gutenberg
hey, i got it fixed by the following code. The sub-field should be in the while loop.
<section id="{{$id}}" class="{{$className}}">
<div class="container">
<div class="row">
@if(have_rows('brands'))
<div class="brands__slider">
<div class="owl-carousel owl-theme">
@while(have_rows('brands'))
@php
the_row();
$brand = get_sub_field('brand');
@endphp
<div class="brands__brand">
{!! wp_get_attachment_image($brand['id'], 'thumbnail', false) !!}
</div>
@endwhile
</div>
</div>
@endif
</div>
</div>
</section>
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.