Advertisement
Guest User

Untitled

a guest
Nov 28th, 2013
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. <div class="excerpt_image">
  2. <?php if(get_field('excerpt_image')): ?>
  3. <?php
  4. $attachment_id = get_field('excerpt_image');
  5. $size = "thumbnail"; // (thumbnail, medium, large, full or custom size)
  6. $image = wp_get_attachment_image_src( $attachment_id, $size );
  7. ?>
  8. <img src="<?php echo $image[0]; ?>" />
  9. <?php endif; ?>
  10. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement