Home › Forums › Add-ons › Repeater Field › Having problems with the_sub_field(); › Reply To: Having problems with the_sub_field();
Got it working by not using the_sub_field.. either way I would like to get to the bottom of this for future use. Many thanks.
Working script:
// Stage two
// For each field id store each fitters name in the posts array in a new array named $values.
foreach($fields_id as $fields){
$rows = get_field('fitters', $fields);
if($rows):
foreach($rows as $row) {
$values[] = $row['fittersname'];
}
endif;
}
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.