I created a Twenty Ten child theme and added code to the page.php file that pulls an excerpt from each of my five recent blog posts and displays them on my static home page. I wanted to add a thumbnail photo to appear alongside the excerpts as well, and have found I can do this by uploading a photo of 150 x 150 dimensions and using the featured image option.
However, I would also like to have a custom header for each of the actual post pages, and to do this I have to upload a photo that has dimensions of 940 x 198, which is my theme requirement. By uploading the 940 x 198 photo the custom post header appears properly, but instead of a post thumbnail being displayed on my static home page, a 940 x 198 photo displays next to my post excerpt.
Is there a way I can have both a custom header for the actual post page and a 150 x 150 thumbnail appear on my home page? Below is the added code to my child theme page.php file.
<div id="frontpagepostpull"> <?php $temp_query = $wp_query; ?> <?php query_posts('showposts=5'); ?> <?php while (have_posts()) : the_post(); ?> <div class="post" id="post-<?php the_ID(); ?>"> <h3><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h3> <?php the_post_thumbnail('front-page-post-thumbnail'); ?> <?php the_excerpt(); ?> </div> <?php endwhile; ?> </div>
My home page shows what I have so far. http://www.laketahoeweddings.net
Thanks for any advice or help.
- The topic ‘Using Featured Image Option for Post Thumbnail’ is closed to new replies.