Created
May 17, 2017 09:29
-
-
Save DevShahidul/1ca8a71a06b2f75059debc454a2eb598 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
if ( have_posts() ) : while ( have_posts() ) : the_post(); | |
if ( has_post_thumbnail() ) { | |
$feat_image_url = wp_get_attachment_url( get_post_thumbnail_id() ); | |
echo '<div style="background-image:url('.$feat_image_url.');"></div>'; | |
} | |
endwhile; | |
endif; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment