WordPress.org

Support

Support » Installation » [Resolved] Thumbnails not generated

[Resolved] Thumbnails not generated

  • Hi,

    I’ve added an image to a post, but the thumbnail is not being displayed when the post is listed in a category for example. In fact no thumbnails are being generated for any posts. So all I get is a black box next to the blurb in the categories section.

    My theme also has a featured content box on the homepage (theme is: http://www.revolutiontwo.com/demo/office) – You can see the rotating images on the homepage. This is supposed to pull the images from certain posts and display them there. It works fine in that link but not on my installation.

    My source code ultimately shows: <img src=”” alt=”Post Name” /> So it’s not successfully pulling the images out.

    My guess is because the theme was made before 2.7 there are some compatibility issues…? Any help would be greatly appreciated.

    Thank you.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Ok I seem to have sorted it out. For future visitors with the same predicament, here’s how I fixed it:

    1. Visit: http://bloggingbits.com/post-thumbnails-in-wordpress/ – I started to follow it from Step 3, steps 1 and 2 were already sorted in the theme.

    2. I edited the home.php file (in wp-content/themes/your theme/home.php

    Where it said (may not be the same for your theme):

    <img src="<?php $key="thumbnail"; echo get_post_meta($post->ID, $key, true); ?>" alt="<?php the_title() ?>" />

    I replaced with:

    <img src="<?php $values = get_post_custom_values("thumb"); echo $values[0]; ?>" alt="<?php the_title() ?>" class="thumb" /> – So essentially step 3 on the link I posted.

    3. Uploaded my image again (in a test post). Followed step 4 from the website….and it worked beautifully.

    I only changed one part of the home.php file, of course there will be more instances of when thumbnails will be called – depends on your theme. But do the same for every time an image has to be called.

    I’m still not sure what was going wrong initially, and it’s quite possible that there’s a simpler fix. But if nothing else comes to light then at least you know this will work.

    Anyone out there know a less time intensive fix? Maybe I was doing something wrong to start with….?!

    ok one more question. I want to show thumbnails for certain posts on the homepage, but I don’t want those images to appear in the posts themselves. Because the thumbnails generated essentially depend on there being an image in the post, is there a workaround?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] Thumbnails not generated’ is closed to new replies.
Skip to toolbar