Created
November 18, 2012 16:12
-
-
Save wpmark/4106040 to your computer and use it in GitHub Desktop.
Get WordPress Featured Image URL
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 | |
/* get featured image url function */ | |
function mdw_featured_img_url( $mdw_featured_img_size ) { | |
$mdw_image_id = get_post_thumbnail_id(); | |
$mdw_image_url = wp_get_attachment_image_src( $mdw_image_id, $mdw_featured_img_size ); | |
$mdw_image_url = $mdw_image_url[0]; | |
return $mdw_image_url; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment