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

Here is my site and image is not showing on my homepage but when i click on post then image appears..i am new to php world..please tell me brief steps..i will be very thankfull to you.

Thanks In Advance

share|improve this question
When asking for help please provide code as well as inform us of what you tried and the results. – BandonRandon Oct 6 '11 at 7:08
Please do not use edits of others' posts for discussion. You should be able to use comment on your own question even without required reputation. – Rarst Oct 6 '11 at 8:27

closed as too localized by toscho Jul 17 '12 at 23:48

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, see the FAQ.

1 Answer

You probably need to do something like this:

$url = wp_get_attachment_url( get_post_thumbnail_id($post->ID) );
<img src="<?php echo $url; ?>" longdesc="URL_2" alt="Text_2" />
share|improve this answer

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