Unless I’m mistaken, the initial data in the repeatable field meta key/value pair is just an array of arrays.
$my_group = get_post_meta( get_the_ID(), 'my_group_data', true );
$my_group[] = array( 'item_1' => 'value_1', 'item_2' => 'value_2' );
update_post_meta( get_the_ID(), 'my_group_data', $my_group );
Won’t hurt to do a var_dump or so on your initially fetched meta data to see its structure and match as such.
Thread Starter
Begin
(@bentalgad)
I’m not using group just single repeatable field. but got it! Thanks!
Derp @ me regarding the group part, but I have to believe the setup is still going to be the same, an array storing the content for the field. Insert a new index for the field, update. Still won’t hurt to check the structure so you can match appropriately.
Thread Starter
Begin
(@bentalgad)
Great. got it! Thanks again!