• Resolved Badda Bing

    (@disastrid)


    I’ve searched a lot on this topic, but either I’m not using the right words or everything I’m finding is going over my head.

    I’ve got a loop running on a page. It currently displays the entire content of each post. Instead, I’d like it to display just the excerpt.

    My PHP is currently super-simple and looks like this:

    <?php
    /* Run the loop to output the posts.
    * If you want to overload this in a child theme then include a file
    * called loop-index.php and that will be used instead.
    */
    get_template_part( ‘loop’, ‘index’ );
    ?>

    Every time I alter this it breaks! Bright ideas very much appreciated, I can’t seem to make this work.

Viewing 2 replies - 1 through 2 (of 2 total)
  • get_template_part( 'loop', 'index' ); points to the template loop.php where you might need to make the edits;

    change the_content() to the_excerpt()

    if you have problems, please post the name of your theme.

    Thread Starter Badda Bing

    (@disastrid)

    AHHHH! That’s it! Thanks so much, I knew I must have been going wrong somewhere really silly and obvious.

    Cheers for the point in the right direction!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Getting the loop to display excerpts, not the whole post’ is closed to new replies.