Created
June 7, 2015 09:24
-
-
Save monoescape/5f972e4be7c04457f56d to your computer and use it in GitHub Desktop.
This file contains 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
<div id="container"> | |
<?php | |
$rows = get_field('repeater' ); // get all the rows | |
$first_row = $rows[0]; // get the first row | |
$first_row_image = $first_row['image_1']; // get the sub field value | |
$image_small = wp_get_attachment_image_src( $first_row_image, 'thumbnail' ); | |
$image_full = wp_get_attachment_image_src( $first_row_image, 'full' ); | |
?> | |
<a class="image-link" href="<?php echo $image_full[0]; ?>"> | |
<img src="<?php echo $image_small[0]; ?>" width="<?php echo $image[1]; ?>" height="<?php echo $image[2]; ?>"/> | |
</a> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment