• I have a blog that uses the Revolution Lifestyle theme and when an article is posted on one of the main categories a summary shows up for it with a little bit of text and a thumbnail to the left of it.

    Well, it’s supposed to pull these images automatically somehow but it’s not… all I get is the red X as it’s looking for a picture called thumbnail.png… which sure I could fix that by putting a pic titled thumbnail.png in my themes image folder but that will make ALL the new posts have the same thumbnail.

    I did notice in the home.php file that it has this code but I have no clue how to make this work..

    <!--This is where the thumbnails are found for the homepage bottom section - note the custom field name for this image is "thumbnail". Recommended image size is 70x70, as the stylesheet is written for this size.-->
    
    				<?php $recent = new WP_Query("cat=3&showposts=3"); while($recent->have_posts()) : $recent->the_post();?>
    				<?php if( get_post_meta($post->ID, "thumbnail", true) ): ?>
    				    <a href="<?php the_permalink() ?>" rel="bookmark"><img style="float:left;margin:0px 10px 0px 0px;" src="<?php echo get_post_meta($post->ID, "thumbnail", true); ?>" alt="<?php the_title(); ?>" /></a>
    				<?php else: ?>
    				   	<a href="<?php the_permalink() ?>" rel="bookmark"><img style="float:left;margin:0px 10px 0px 0px;"  src="<?php bloginfo('template_url'); ?>/images/thumbnail.png" alt="<?php the_title(); ?>" /></a>
    				<?php endif; ?>
    				<b><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></b>
    				<?php the_content_limit(80, ""); ?>
    
    				<div style="border-bottom:1px dotted #94B1DF; margin-bottom:10px; padding:0px 0px 10px 0px; clear:both;"></div>

    The post itself doesn’t have an image in it and I tried adding one and that didn’t work.

    Any help?

Viewing 1 replies (of 1 total)
  • <?php if( get_post_meta($post->ID, "thumbnail", true) ): ?>

    This is looking for a custom field in the post with the key of Thumbnail and the value of this would be the URL of the thumbnail image. If you add this to your post in the custom fields section it should show up.

Viewing 1 replies (of 1 total)
  • The topic ‘Can't get thumbnails for homepage summaries to show up automatically’ is closed to new replies.