Support

Account

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

  • Hi @websitewalrus

    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;