Skip to content

Instantly share code, notes, and snippets.

@jdcauley
Last active August 29, 2015 14:04
Show Gist options
  • Save jdcauley/83991f9b6ce599d8c75a to your computer and use it in GitHub Desktop.
Save jdcauley/83991f9b6ce599d8c75a to your computer and use it in GitHub Desktop.
Image Empty State
<div class="blog-img">
<?php if (has_post_thumbnail()): ?>
<?php $src = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), array( 5600,1000 ), false, '' ); ?>
<div class="blog-feature" style="background-image: url(<?php echo $src[0]; ?>);"></div>
<?php else: ?>
<div class="blog-feature-empty"></div>
<?php endif; ?>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment