Skip to content

Instantly share code, notes, and snippets.

@tjhole
Created December 1, 2015 11:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tjhole/0b162602aa209dc11b36 to your computer and use it in GitHub Desktop.
Save tjhole/0b162602aa209dc11b36 to your computer and use it in GitHub Desktop.
<?php
$rows = get_field('repeater_field_name' ); // get all the rows
$first_row = $rows[0]; // get the first row
$first_row_image = $first_row['sub_field_name' ]; // get the sub field value
// Note
// $first_row_image = 123 (image ID)
$image = wp_get_attachment_image_src( $first_row_image, 'full' );
// url = $image[0];
// width = $image[1];
// height = $image[2];
?>
<img src="<?php echo $image[0]; ?>" />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment