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 am using wordpress 3.4.1. I need to display the featured image of a page. How can i get the featured image url by particular page id. Any help?

share|improve this question
add comment

1 Answer

up vote 5 down vote accepted

Did you tried anything? Its always helpful to share what you have tired.

$url = wp_get_attachment_url( get_post_thumbnail_id($post_id, 'thumbnail_size') );



share|improve this answer
It works. Thanks –  Sam Hanson Dec 22 '12 at 7:59
add comment

Your Answer


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.