Home › Forums › Add-ons › Repeater Field › Get subfields from a repeater on one page to appear on another page – not workin › Reply To: Get subfields from a repeater on one page to appear on another page – not workin
The get_sub_field() does not accept a post_id parameter, please assign this to the have_rows() like so:
// check if the repeater field has rows of data
if( have_rows('repeater_field_name','22283') ):
// loop through the rows of data
while ( have_rows('repeater_field_name','22283') ) : the_row();
$regions2 = get_sub_field('regions_list');
endwhile;
else :
// no rows found
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.