Created
December 1, 2015 11:04
-
-
Save tjhole/0b162602aa209dc11b36 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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