Skip to content

Instantly share code, notes, and snippets.

@erickarbe
Created June 5, 2012 19:47
Show Gist options
  • Save erickarbe/2877312 to your computer and use it in GitHub Desktop.
Save erickarbe/2877312 to your computer and use it in GitHub Desktop.
Get Image Converted to URL
<?php $get_the_image_as_array = get_the_image( array( 'image_scan' => true, 'format' => 'array' ) ); ?>
<?php if ($get_the_image_as_array[url]) { ?>
<div class="thumbnail-wrap">
<?php if ( function_exists( 'get_the_image' ) ) { ?>
<img src="<?php echo $get_the_image_as_array[url]; ?>">
<?php } ?>
</div>
<?php } ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment