I am trying to use a custom fields plugin to replace the featured image on a post. If the custom field is empty i want it to show the featured image, if the custom field has an image i want it to show that image.
<div class="showcase-pic">
<?php $image = get_field('shown_image');
if ( !empty($image) ): ?>
<a href="<?php echo $image['url']; ?>"><img src="<?php echo $image['url']; ?>" alt="<?php echo $image['alt']; ?>" /></a><br />
<?php elseif (has_post_thumbnail( $post->ID ) ): ?>
<?php $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'single-post-thumbnail' ); ?>
<a href="<?php echo $image[0]; ?>"><img src="<?php echo $image[0]; ?>" alt=""></a>
<?php endif; ?>
</div><!--eof of show case pic -->