Reputation: 2096
I have installed wordpress on my local wampp server. The question refers to the default theme that comes with wordpress after the first install(twentytwelve).
I have created a test post and I am trying to display the featured image inside the post. As I understand I need to use the function:
the_post_thumbnail
However, as I am not very familiar with wordpress theme development I do not know how to use this function or what file from the template files I should modify. Thanks a lot for any help regarding this issue.
Upvotes: 1
Views: 6558
Reputation: 33
Its very simple: Open your style.css Search
@media screen and (max-width: 400px) { or search .list-view .site-content .cat-links, .list-view .site-content .type-post .entry-content, .list-view .site-content .type-page .entry-content, .list-view .site-content .type-post .entry-summary, .list-view .site-content .type-page .entry-summary, .list-view .site-content footer.entry-meta { /*display: none; jay*/ } and comment this line display: none;
Thats all, problem will be solved.
Upvotes: 0
Reputation: 5267
You'll want to call that function from within the WordPress Loop. Using the twentytwelve theme as your example, open single.php
(which is the default template for the detail view of your single post). You can use this function anywhere between lines 15 - 27.
If you want to display the image in a Page (not a Post) then you'll edit page.php
instead.
The Codex has more detailed information on how to use the the_post_thumnail()
function (for example, how to request a different image size).
Have fun!
Upvotes: 4