Support

Account

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>