0

How do I add thumbnail images to the list of blog posts at http://richardclunan.com/blog/ ?

When I'm creating or editing a blog post, if I use the Featured Image link at the bottom right in the admin panel, no thumbnail appears by the corresponding blog post excerpt in the list of blog posts.

I'm using theme twentyeleven, with some modifications in a childtheme file.

................................. Edit:

Here's what I did, and the thumbnails are still not showing:

I added an image to use as a thumbnail, using the Media Library.

I added a 'Featured Image' in 'Edit Post', and in Edit Post, an image is showing there, so that looks like it should be working.

I added the url of the thumbnail in 'Custom Fields' in Edit Post.

But on the blog page, there's no thumbnail showing: http://richardclunan.com/blog/ -- the second post down 'Whodunnit...' is the post I added a thumbnail for.

(I don't know if the following is relevant, but I have a childtheme of twentyeleven. If I switch back to the twentyeleven theme, the Blog page disappears from the menu on the site, but I can still navigate to http://richardclunan.com/blog/ and still no thumbnail appears on that post.)

I've also tried installing the plugin 'Thumbnail for Excerpts' and thumbnails still don't show

1 Answer 1

1

In your child theme, are you calling the thumbnail?

This is the default use from the WordPress Codex

<?php 
  if ( has_post_thumbnail() ) { // check if the post has a Post Thumbnail assigned to it.
  the_post_thumbnail();
  } 
?>
<?php the_content(); ?>
5
  • Thanks butchpage. I've searched the file 'style.css' -- the file that's in my child theme folder -- and I don't see the code you've pasted there. Where in style.css should I paste that code? The style.css file seems to be split into these sections: /* =Structure /* =Global /* =Header /* =Menu /* =Content /* =Aside /* =Link /* =Gallery /* =Status /* =Quote /* =Image /* =error404 /* =Showcase /* =Attachments /* =Navigation /* =Widgets /* =Comments /* =Footer /* =Responsive Structure /* =Print /* =IE7 ...and I presume I would paste that code after a curly bracket } ...?
    – Richard
    Jan 28, 2012 at 19:41
  • is not in style.css, find the template your are using, could be the single.php (if a post) or page, the css is only for styles. Jan 28, 2012 at 20:06
  • in 'twentyeleven-child' there's only one file: style.css -- in 'twentyeleven' there is a file 'single.php' -- is that the file i need to edit? that file doesnt have the code you pasted. it does have this code: <?php while ( have_posts() ) : the_post(); ?>
    – Richard
    Jan 28, 2012 at 20:30
  • Thats the loop, inside of that code block is where WordPress will spit out the page's content. single.php is the template that WordPress will use to display post type pages. Look at this codex page to see the files used for each page.
    – butchpage
    Jan 28, 2012 at 20:42
  • I don't understand which file I need to edit or how to figure out which file I need to edit
    – Richard
    Jan 29, 2012 at 10:19

Your Answer

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

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