php - Wordpress ACF Add_Row to Nested Repeater -
i'm trying add new row acf repeater nested inside repeater. 2nd-level repeater contains 2 sub-fields i'm adding array pass add_row()
. row not added when run this. think may using add_row
incorrectly, not sure i'm going wrong. appreciate help!
$mydata = array( 'field_59796b22b2fa0' => 'com', 'field_59796b3bb2fa1' => 1 ); if( have_rows('field_596c523609342', $id) ) { while( have_rows('field_596c523609342', $id) ) { the_row(); if( have_rows('2field_59796b08b2f9f', $id) ) { while( have_rows('2field_59796b08b2f9f', $id) ) { the_row(); add_row('field_59796b08b2f9f', $mydata, $id); } } } }
Comments
Post a Comment