Support

Account

Home Forums General Issues Repeater Output

Helping

Repeater Output

  • Hi,

    I was wondering if anyone could help please. I’m having massive issues getting an acf repeater to actually echo any content to screen.

    The code I am using is below. The repeater control is inside a field group and the repeater field itself is called mail_services. The subfield is called mail_heading.

    `<?php if(get_field(‘mail_services’)): ?>

    <?php while(has_sub_field(‘mail_services’)): ?>

    <?php $heading = get_sub_field(‘mail_heading’);

    echo $heading; ?>

    <?php endwhile; ?>

    <?php endif; ?>

  • I have also tried the following code: –

    <?php if( have_rows(‘mail_services’) ): ?>

      <?php while( have_rows(‘mail_services’) ): the_row(); ?>

    • <?php the_sub_field(‘mail_heading’); ?>
    • <?php endwhile; ?>

    <?php endif; ?>

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.