Home › Forums › ACF PRO › Is it possible to have 2 flexible field groups, but they work like one › Reply To: Is it possible to have 2 flexible field groups, but they work like one
Something like that no ?
<?php if( have_rows('repeater') ): ?>
<?php while( have_rows('repeater') ): the_row(); ?>
<?php
if (get_sub_field('reusable_field')) {
foreach (get_sub_field('reusable_field') as $p) {
if( have_rows('flexible') ):
while ( have_rows('flexible') ) : the_row();
if( get_row_layout() == 'layout_flexible' ):
foreach (get_sub_field('subfields_of_layout_flexible') as $p) {
echo $p;
the_sub_field('subfieldName');
echo "<br>";
the_sub_field('subFieldName2');
}
?>
<?php elseif( get_row_layout() == 'other' ):
endif;
endwhile;
else :
endif;
}
} ?>
<?php endwhile; ?>
<?php 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.