How to Show Full Posts on WordPress Archive Pages

I created a page of all the stories I’ve posted here at jaydinitto.com—really just the “Story” category archive page. The default is to show an excerpt of the post on archive page, but I wanted to show the whole post content. Unfortunately, that’s not a option in the WordPress admin console, and WordPress’ miasma of spaghetti-code doesn’t make it easy to pinpoint where that needs to be done. I did figure out one way, probably not the most elegant way, to do it.

My theme is a child of the Blankslate theme, and I’m running WordPress 5.4.1.

  1. Assuming you have a child theme, you’d want to copy the entry.php file into it. Otherwise, just edit that original file directly. Keep in mind this is using the Blankslate theme; other themes or WordPress versions might not have the entry.php file.
  2. Look for this bit of code, which is a series of conditions that, if one or a series of them passes, it will show the summary. Otherwise the page will render the full post content. Where this code is depends on the theme you’re using. In mine, it’s near the bottom:

    <?php get_template_part( 'entry', ( is_front_page() || is_home() || is_front_page() && is_home() || is_archive() || is_search() ? 'summary' : 'content' ) ); ?>

  3. You’ll want to delete the is_archive() variable (and, obviously, one of the “||” conditionals), and all archive pages will show the full post content:

    <?php get_template_part( 'entry', ( is_front_page() || is_home() || is_front_page() && is_home() || is_search() ? 'summary' : 'content' ) ); ?>

  4. But, I only really wanted to show have my “Stories” categories archive page to show full posts. I was okay with all the other category and tag pages showing only excerpts. So, I actually kept the is_archive() condition and checked if the archive page was not the “Stories” category. Then it will show post summaries:

    <?php get_template_part( 'entry', ( is_front_page() || is_home() || is_front_page() && is_home() || is_archive() && is_category( $category != 'stories' ) || is_search() ? 'summary' : 'content' ) ); ?>

Edit: It seems like all category and tag archive pages are showing the full post content. I am probably missing something with the logic.

2 Comments

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.