php - display featured image in post - wordpress theme -
i have installed wordpress on local wampp server. question refers default theme comes wordpress after first install(twentytwelve).
i have created test post , trying display featured image inside post. understand need use function:
the_post_thumbnail
however, not familiar wordpress theme development not know how use function or file template files should modify. lot regarding issue.
you'll want call function within wordpress loop. using twentytwelve theme example, open single.php
(which default template detail view of single post). can use function anywhere between lines 15 - 27.
if want display image in page (not post) you'll edit page.php
instead.
the codex has more detailed information on how use the_post_thumnail()
function (for example, how request different image size).
have fun!
Comments
Post a Comment