php - Advanced Custom Fields within WordPress - Unable to use a repeater within a group

one text

Solution:

Instead of this

<?php
$sector_applications = get_sub_field('sector_applications');
?>

Use this

while ( have_rows('sector_applications') ): the_row();

And then call your sub_fields. It's a an repeater inside an repeater. Like a foreach loop inside a foreach. You called it like it's an field but actualy has rows.

have_rows() – allows us to loop through the available rows in a repeater / flexible content field
get_sub_field() – returns the value of a sub field (from the current repeater in “has_sub_field”)
the_sub_field() – displays the value of a sub field (from the current repeater in “has_sub_field”)

More information and an good example you can find in ACF | Working with Nested Repeaters

I think the problem is here, I have modified your part of the code

<?php
while ( have_rows('application_sectors') ): the_row();
$image = get_sub_field('image');
$heading = get_sub_field('heading');

while ( have_rows('sector_applications') ): the_row();
?>

Your structue is this: Repeater

  • sub_fields (a.k.a get_field)

But you don't get into another repeater...

In my example you have

Repeater

  • sub_fields (a.k.a get_field)
  • repeater inside repeater
    • then you can again the sub_fields from this part of the repeater

Source