Support » Plugin: Simple Fields » Show repeatable image fields

  • I want to show all the images that are set in the WordPress Backend. I have used the repeatable fields setting.

    I thought this was correct code, but it doesn’t work:

    				$repeatable_field_values = simple_fields_values("image_repeater");
    				foreach ($repeatable_field_values as $value) {
    					// Field slug is "image_repeater"
    					$file_id = $value["image_repeater"];
    					$image_info = wp_get_attachment_image_src($file_id, "full");
    					$image_url = $image_info[0];
    					echo $image_url;
    					echo "<img src='$image_url' alt='' />";

    Some information about the fields, when I click in the backend on “Show custom field keys”. The following information is given:

    Meta key: _simple_fields_fieldGroupID_1_fieldID_1_numInSet_0
    Field slug: image_repeater

    I have only multiple image fields that I want to repeat and show below each other.

    Hope you can help me out.

  • The topic ‘Show repeatable image fields’ is closed to new replies.