Search/category view without entire post

How do you get the blog to show excerpts instead of whole blog posts?

  • DavidM
    • DEV MAN’s Mascot

    Hiya josephdowdy,

    Do you mean on the individual blog posts themselves, you’d like to display the excerpts rather than the blog posts?

    Or is there a specific template or section you’re referring to? Perhaps you could provide a link or screenshot to illustrate?



  • josephdowdy
    • Site Builder, Child of Zeus

    Well, it’s pretty simple. I’m sorry it wasn’t clearer; that’s my fault.

    When I click on the category, I don’t get a list of posts with titles and excerpts. I just get all of the entire blog post entries. It’d be better if it were just the excerpts because more will fit on one page without scrolling down.

  • josephdowdy
    • Site Builder, Child of Zeus

    <?php /* Start the Loop */ ?>

    <?php while ( have_posts() ) : the_post(); ?>


    /* Include the Post-Format-specific template for the content.

    * If you want to overload this in a child theme then include a file

    * called content-___.php (where ___ is the Post Format name) and that will be used instead.


    get_template_part( ‘excerpt’, get_post_format() );


    * Replaced ‘content’ with ‘excerpt’.

    <?php endwhile; ?>

    <?php twentyeleven_content_nav( ‘nav-below’ ); ?>

    <?php else : ?>

    <article id=”post-0″ class=”post no-results not-found”>

    <header class=”entry-header”>

    <h1 class=”entry-title”><?php _e( ‘Nothing Found’, ‘twentyeleven’ ); ?></h1>

  • Tammie
    • WordPress Wizard

    Sorry to interject but I think the confusion here is you shouldn’t be changing that template part to excerpt.

    get_template_part( 'content', get_post_format() );

    That’s a call to the file either content.php or content-aside, content-gallery.php … Now, what Phil was suggesting was where you have the_content() you change to the_excerpt – this will then give you excerpts.

    That would be in content.php and all the -postformat.php content files maybe (depends on theme). Content-single.php should only have the_content so that should be left.

    I could be wrong but hopefully I’m reading the cross communication here right and have helped – sorry to pipe up :slight_smile:

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.