Created
January 10, 2018 11:30
-
-
Save mrkkr/8b62de01df213e2f9e00f8d7739afb22 to your computer and use it in GitHub Desktop.
Featured Image w background image #php #css
This file contains hidden or 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 $backgroundImg = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'full' ); ?> | |
<div class="img-container" style="background-image: url('<?php echo $backgroundImg[0]; ?>');"></div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment