Skip to main content

ACF Field: Content With Repeated Images

This document details the usage and programmatic update of the Content With Repeated Images Advanced Custom Fields (ACF) field.

⚠️ Important Warning: Typo in Slug​

Please note that the internal field slug contains a typo. It is named content_with_repated_images (missing the 'e' in "repeated").

Field Slug: content_with_repated_images

Data Structure​

This field is an ACF Repeater consisting of the following subfields:

  • content: A WYSIWYG editor field for text content.
  • image: An Image field (stores the Image ID).

Programmatic Update Example​

To update this field programmatically, you can use the standard update_field function. Construct an array of arrays, where each inner array represents a row in the repeater.

$repeater_data = [
['content' => '...', 'image' => 123],
['content' => '...', 'image' => 456]
];
update_field('content_with_repated_images', $repeater_data, $post_id);

File References​

This field is primarily used in the theme file:

  • single-pix-article.php