Couple options:
1. Use the ‘more‘ quicktag in each post to define where your “Continue Reading” link is to display, then replace:
<?php the_content(); ?>
in your index.php (or home.php) template with:
<?php
if( !is_paged() && is_home() && ($post == $posts[0]) ) :
echo apply_filters('the_content', $post->post_content);
else :
the_content('Continue Reading');
endif;
?>
The if statement tests on if we are *not* on a paginated page (i.e. page 2, page 3, etc), on the home or front page, and the loop is presently working on the first post in the $posts object ($posts[0]). If so, we bypass the functionality of the_content(), especially for the ‘more’ quicktag. Otherwise it operates as usual.
2. If you choose not to use the ‘more’ quicktag, you can replace the_excerpt() (which displays a summary of the post) for the_content() on all posts but the first:
<?php
if( !is_paged() && is_home() && ($post == $posts[0]) ) :
the_content();
else :
the_excerpt();
?>
<a href="<?php the_permalink(); ?>">Continue Reading</a>
<?php endif; ?>
This is great information and it works fantastic.
However, when I have 1 thumbnail picture at the top of every article, it won’t show the thumbnail in the “excerpt” on the front page.
How can I get it to show the thumbnails on every post on the homepage?
Thanks!
Option 1. Do not use the_excerpt().
Option 2. Use the_excerpt(), but place what text you want displayed in it (including your image(s)) in the optional excerpt field of a post.
Option 3. Use a plugin like my the_excerpt Reloaded:
http://guff.szub.net/2005/02/26/the_excerpt-reloaded/
Kafkaesqui thanks for this great solution.
I was using on my blog, but recently when I upgraded to 2.5 it stopped working. I have double checked and verified the code is still there in my theme’s index.php file, but the homepage is still showing all excerpts.
You can view it at http://www.whollysurrender.com.
Here is some code from my theme’s index page:
<div id="content">
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<div class="post" id="post-<?php the_ID(); ?>">
<h2 id="post-<?php the_ID(); ?>"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
<small><?php the_time('F jS, Y') ?> | <?php the_author() ?> </small>
<div class="entry">
<!--<?php the_content('Read the rest of this entry »'); ?>-->
<?php
if( !is_paged() && is_home() && ($post == $posts[0]) ) :
the_content('Read the rest of this entry »');
else :
the_excerpt();
?>
<a href="<?php the_permalink(); ?>">Continue Reading</a>
<?php endif; ?>
</div>
<p class="postmetadata"><img src="<?php bloginfo('template_directory'); ?>/images/folder_edit.png" alt="category"></img> <?php the_category(', ') ?> <img src="<?php bloginfo('template_directory'); ?>/images/comments.png" alt="comments"></img> <?php comments_popup_link('No Comments', '1 Comment', '% Comments'); ?> <?php edit_post_link('//Edit'); ?></p>
</div>
Any ideas why this code is not working with the new upgrade?
Thanks for your help.