Tell me more ×
WordPress Answers is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

In my theme I want to display the featured image, but I also want to display the title attribute (of the image, not of the post/page) beside the image itself.

Is there a simple way to do this? Where should I be looking?

Thanks, John.

share|improve this question
Can you mark your question as answered since you found the solution. You can answer your own question. This removes it from the unanswered list. – xLRDxREVENGEx May 20 '11 at 17:54

1 Answer

Easy!

<?php the_post_thumbnail();
echo get_post(get_post_thumbnail_id())->post_excerpt; ?>

Taken from: http://www.billerickson.net/wordpress-featured-image-captions/

share|improve this answer

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.