Support

Account

Home Forums Add-ons Repeater Field Repeater field saved in content Reply To: Repeater field saved in content

  • a repeater field is a nested array in $_POST[‘acf’]

    
    $_POST['acf'][$repeater_field_key][$ROW_INDEX][$subfield_key]
    

    So you need to loop through the repeater field to get each row and then get the sub field

    
    foreach ($acf[$repeater_field_key] as $row) {
      $image_id = $row[$sub_field_key];
    }
    

    ACF stores attachment IDs for images, so if you want to insert it into the content you’ll need to use wp function to get the attachment information and build the image tag. https://developer.wordpress.org/reference/hooks/wp_get_attachment_image_src/