0

I tried adding an thumbnail sized image in the very first line of the post so that I want my category list search should display with this thumbnail and some text with "read more" button but this image is not displaying in the category list view but its displaying when I click on the post. Is there any way to fix it? I tried many plugins but none worked for me.

add_theme_support( 'post-thumbnails' );

The above line is already active in my site. Thanks.

1
  • Does your category list view page have the code to display the image? Commented Jan 1, 2014 at 17:01

2 Answers 2

1

add_theme_support( 'post-thumbnails' ); only adds the ability to use Featured Images. To have them appear in your site, you'll need to add code to at least one of your template files, your active theme's functions.php file, or a custom plugin.

// in The Loop
if( has_post_thumbnail() ) {
    the_post_thumbnail();
}
// etc.

References

1

Make sure that you have assigned the image you wish to use as the "Featured Image". That is what WordPress is looking for when you use the functions to display the image. The WordPress core themes *Twenty-_* should have an example on how to display the post thumbnail in the archive/category listings if you have not found that code snippet already.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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