Image Custom Field

An easy way to call the a custom field for an image source. Includes IF statement to check if custom field is true.

Code Snippet:

<?php $image = get_post_meta($post->ID, 'image', TRUE); ?>
<?php if($image) { ?>
	<img src="<?php echo $image; ?>" alt="Alt Text" />
<?php } ?>

Posted in Images, Custom Fields