Twenty Ten Skip the Excerpts

How do I display whole posts in search and archives

In the Loop.php find:

<?php /* How to display all other posts. */ ?>

then a few lines later – -

Original Code:

<?php if ( is_archive() || is_search() ) : // Only display excerpts for archives and search. ?>
<div class=”entry-summary”>
<?php the_excerpt(); ?>
</div><!– .entry-summary –>

Change to:

<?php if ( is_archive() || is_search() ) : // Display full content for archives and search. ?>
<div class=”entry-content”>
<?php the_content(); ?>
</div><!– .entry-content –>

You should change the notation to say you are displaying full content instead of excerpt.

Simple enough,   not really, here is the tricky part.   This code appears several places in the loop, if you don’t change the right one you won’t see any change at all.

So which one do you need to change?   Make sure it is the one after you see:

<?php /* How to display all other posts. */ ?>

Print Friendly

About Dave Smith

Did you know that with Twenty Ten if you fill in the User Biographical info field it will put an author window at the end of each post. Be sure to get your gravatar for all authors on your site. And fill out the Bio field in the profile. Connect with Dave on Google+
This entry was posted in TwentyTen and tagged , . Bookmark the permalink.

2 Responses to Twenty Ten Skip the Excerpts

  1. I’ve actually had a whale of a time getting this right. Thanks for the easy breakdown. Getting the right one changed took a lot of trial and error for me before, I’m not the MOST tech savvy blogger out there.

  2. Thanks for posting this! It worked on a new WP site I’m working on with the Twenty-Ten theme.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

* Copy this password:

* Type or paste password here:

18,372 Spam Comments Blocked so far by Spam Free Wordpress

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

CommentLuv badge