Blog Pile

Archive Templates As Summaries

Ok, chipping away more at the WP templates. One of my blog software critcisms is the notion that an “archive” listing is just a bunch of the posts in a category or date range all glued together (see “All Your Archives Are Wrong”).

To be honest, I should poke more through the WordPress docs and better understand the template system, but I am more prone to hack away at the templates until they do what I like.

So I just monkeyed a bit to get WordPress playing my way. First for the Date archives, edit the archive archive.php template, changing the portion that reads:


to read:

  • ( )
    ...
    Posted in | |'); ?>

Note that I am using the_excerpt_rss() to get a non HTML shorter version for the text of the post excerpt as a brief summary. I’ve flattened some of the display, and put it in an unordered list (my own stylesheet addition of a .arch_list li class listing is just something with margin-bottom:1em to space items on the output)

This creates to me more of an archive as an index, rather than an archive of glued together posts. For category archives, you can use the same file saved as category.php

If this kind of stuff has value, please support me by tossing a one time PayPal kibble or monthly on Patreon
Become a patron at Patreon!
Profile Picture for CogDog The Blog
An early 90s builder of web stuff and blogging Alan Levine barks at CogDogBlog.com on web storytelling (#ds106 #4life), photography, bending WordPress, and serendipity in the infinite internet river. He thinks it's weird to write about himself in the third person. And he is 100% into the Fediverse (or tells himself so) Tooting as @cogdog@cosocial.ca