Created
July 11, 2012 21:51
-
-
Save ekka21/3093863 to your computer and use it in GitHub Desktop.
Wordpress: get thumbnail image src
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
/** | |
* Desc: Get image source from feature image | |
* @param $id | |
* @param $icon = 'thumbnail, medium, large or full' | |
* @return $image source | |
*/ | |
function get_me_the_thumbnail_src($id , $size = 'full'){ | |
$tmp = wp_get_attachment_image_src ( get_post_thumbnail_id ( $id ), $icon ) ; | |
$str = $tmp[0]; | |
return $str; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment