1
2
3
4
5
6
7
8
9
10
11
$thumbnail_id   = get_post_thumbnail_id();
$thumbnail_data = wp_get_attachment_image_src($thumbnail_id,'thumbnail', true);
$thumbnail_url  = $thumbnail_data[0]; 
 
/*
Returns an array with values:
 [0] => url of the attachment,
 [1] => image width, 
 [2] => image height, 
 [3] => scale
*/

http://codex.wordpress.org/Function_Reference/wp_get_attachment_image_src

Get the Post Thumbnail URL

Leave a Reply

Your email address will not be published. Required fields are marked *