Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I wish to do something as simple as the_post_thumbnail('large') but I want the URL of the image only, not the HTML which goes with it. Is that possible ?

share|improve this question
1  
You've asked 8 questions, and accepted zero answers. You should start accepting some answers if you want people to keep answering your questions. –  Chip Bennett Jul 4 '11 at 12:42
1  
I didn't even know about the accepting system of this site, but now I'll accept answers I promise –  Mike Jul 4 '11 at 20:04
add comment

1 Answer

up vote 3 down vote accepted

Use get_post_thumbnail_id() to retrieve ID, then wp_get_attachment_image_src() to retrieve array, that will have URL as first element.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.