Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if( has_post_thumbnail(get_the_ID()) ) {
- echo '<div style="background-image:url(\''.wp_get_attachment_url( get_post_thumbnail_id(get_the_ID()) ).'\')"></div>';
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement