codebloo

PODS image loop with wp_get_attachment_image_src

Sep 23rd, 2014
321
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. <?php $carouselPod = pods( 'success', $id);
  2. $minigallery = $carouselPod->field( 'gallery', false );?>
  3.  
  4. <?php foreach($minigallery as $thumb_image) {
  5. $image_attributes = wp_get_attachment_image_src( $thumb_image,'carousel' );
  6. echo '<li><img src="' . $image_attributes[0] . '" /></li>';
  7. } ?>
Advertisement
Add Comment
Please, Sign In to add comment