Created
November 1, 2015 16:03
-
-
Save erezLieberman/0504f20775138fe561d0 to your computer and use it in GitHub Desktop.
get url of featured image in wp
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 $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'full' ); ?> | |
<li style="background-image:url(<?php echo $image[0]; ?>)"> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment