Home › Forums › General Issues › repeater query for specific posts › Reply To: repeater query for specific posts
Where are you getting the sub field values?
I see nothing in your code to actually get a value from a sub field.
if the field ‘children’ is a repeater then this $kids = get_field ('children', $post->ID);
returns an array in the format
$kid = array(
{$row_index} => array(
'sub_field_name' => 'sub_field_value'
)
)
when using a ‘have_rows()’ loop then you need to use get_sub_field() to get the values for the row.
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.