antekera
11/19/2016 - 3:09 PM

Repeater field with image size

Repeater field with image size

 <?php echo " <ul class=slider>"; ?>
			 <?php 
			 $post = $wp_query->post;
			 $rows = get_field('tombstones', $post->ID); 
			 if($rows) $i = 0; { shuffle( $rows );  
			   foreach($rows as $row) { $i++; if($i==16) break; 
			     $image_big = wp_get_attachment_image_src( $row['tombstones_image'], 'full' );
			     $image = wp_get_attachment_image_src( $row['tombstones_image'], 'tombstone_thn' ); ?>
			  <li class="attachment">
			    <a href='<?php echo $image_big[0]; ?>'>
			     <img class="colorbox_link" src="<?php echo $image[0]; ?>" />
			    </a> 
			  </li>
			 <?php } } ?>
			 <?php echo "</ul>"; ?>