Posted By

Tate on 06/14/10


Tagged


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

qubestream


Extract image path from img tag variable


 / Published in: PHP
 

  1. $thumbnail_id=get_the_post_thumbnail($post->ID);
  2. preg_match ('/src="(.*)" class/',$thumbnail_id,$link);
  3. echo $link[1];

Report this snippet  

You need to login to post a comment.