Monday, 27 May 2013

featured image inside post

featured image inside post

I want the featured image of a post to display not only in the blog list view, but also inside the post (when i press "Read More..."). How do i do that?
I pasted this
if ( has_post_thumbnail() ) {
 the_post_thumbnail('full');
}
in single.php just before the_post();. It looks like this:
while (have_posts()) {
    if ( has_post_thumbnail() ) { // check if the post has a Post Thumbnail assigned to it.
      the_post_thumbnail('full');
    }
    the_post();
    get_template_part('content', 'single');
}
But the image shows up, above the title. How do i make it show after the title, just like in the blog list view?

No comments:

Post a Comment