• The homepage of my blog shows the most recent post, but I’d like to change it to show excerpts from the last several posts, and if possible an image for each (I’m fine with using a custom field here).

    I have two files for my theme which could be for the homepage– index.php and home.php– and I’m not sure which it is, so I’m posting both of them here.

    I just don’t know how to edit it to show excerpts with or without thumbnails, even after comparing it to other themes that do.

    Any help would be greatly appreciated.

    index.php

    <?php get_header(); ?>
    
    <div id="content">
    
    <div id="contentleft">
    
    	<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    	<!--You can insert a 336x280 Adsense banner above your posts by editing the adsense-above-titles.php file-->
    	<?php include(TEMPLATEPATH."/adsense-above-titles.php");?>
    	<h2><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h2>
    
    	<!--You can insert a 336x280 Adsense banner below your posts by editing the adsense-below-titles.php file-->
    	<?php include(TEMPLATEPATH."/adsense-below-titles.php");?>
    	<?php the_content(__('Read more'));?><div style="clear:both;"></div>
    	<!--You can insert a 336x280 Adsense banner after your posts by editing the adsense-after-posts.php file-->
    	<?php include(TEMPLATEPATH."/adsense-after-posts.php");?>
     	<p>Filed Under <?php the_category(', ') ?> | <?php comments_popup_link('Leave a Comment', '1 Comment', '% Comments'); ?></p>
    	<p>Tagged With <?php the_tags('', ', ', ''); ?></p>
    	<!--
    	<?php trackback_rdf(); ?>
    	-->
    
    	<h3>Comments</h3>
    	<?php comments_template(); // Get wp-comments.php template ?>
    
    	<?php endwhile; else: ?>
    
    	<p><?php _e('Sorry, no posts matched your criteria.'); ?></p><?php endif; ?>
    
    	</div>
    
    <?php include(TEMPLATEPATH."/l_sidebar.php");?>
    
    </div>
    
    <!-- The main column ends  -->
    
    <?php get_footer(); ?>

    home.php

    <?php get_header(); ?>
    
    <div id="content">
    
    <div id="contentleft">
    <!--You can insert a 336x280 Adsense banner above your posts by editing the above-titles-adsense.php file-->
    	<?php include(TEMPLATEPATH."/adsense-above-titles.php");?>
    
    	<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    	<h2><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h2>
    
    	<!--You can insert a 336x280 Adsense banner below your posts by editing the below-titles-adsense.php file-->
    	<?php include(TEMPLATEPATH."/adsense-below-titles.php");?>
    	<?php the_content(__('Read more'));?><div style="clear:both;"></div>
    	<p>Filed Under <?php the_category(', ') ?> | <?php comments_popup_link('Leave a Comment', '1 Comment', '% Comments'); ?></p>  
    
    	<!--
    	<?php trackback_rdf(); ?>
    	-->
    
    	<?php endwhile; else: ?>
    
    	<p><?php _e('Sorry, no posts matched your criteria.'); ?></p><?php endif; ?>
    	<?php posts_nav_link(' — ', __('&laquo; go back'), __('keep looking &raquo;')); ?>
    
    	</div>
    
    <?php include(TEMPLATEPATH."/l_sidebar.php");?>
    
    </div>
    
    <!-- The main column ends  -->
    
    <?php get_footer(); ?>

The topic ‘How To Show Excerpts On Home Page’ is closed to new replies.