Excerpts on Archive page? (3 posts)

  1. saladgoat
    Posted 2 years ago #

    So the Archive page shows every post, in full.
    I would like very much for the Archive page to show only the Excerpt with the Featured Image for each post.
    I have found many articles suggesting replacing the_content with the_excerpt, which makes perfect sense ... except my Archive.php doesn't have the_content.
    Instead, it has

    get_template_part( 'loop', 'archive' );

    I tried replacing get_template_part with the_excerpt but that only showed an excerpt of the first post in the archive, and without a title and no featured image.

    After that, I am lost.

    My full archive.php:

    (I have it set to show yearly, if that matters.)


  2. Bas Schuiling
    Posted 2 years ago #

    Look inside the theme for a file called 'loop.php' since that is what Get Template Part function tries to load in that statement.

    Probably over there you will see the content printed (otherwise you are welcome to pastebin that file as well so we can have a look ). You are on the right track though with replacing the content for the excerpt. Although the_content should honor the more tag by default.

  3. saladgoat
    Posted 2 years ago #

    Found it! Works exactly how I need it to.
    Thank you very much! :)

Topic Closed

This topic has been closed to new replies.

About this Topic