Created
July 11, 2016 10:08
-
-
Save kirandash/4618c8a8e6e0465b785fa397e2f5cd32 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php if (has_post_thumbnail( $post->ID ) ): ?> | |
<?php $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'single-post-thumbnail' ); ?> | |
<div id="custom-bg" style="background-image: url('<?php echo $image[0]; ?>')"> | |
</div> | |
<?php endif; ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment