I’ve used the Blix Theme on this blog for a good while but the recent release of WordPress 2.1 made me look again at the Blix code which needed changing. One of the decisions I made was to package the Blix archive function as a plugin. In particular I wanted it to work nicely with my Plugin Output Cache.
Blix Archive v1.0.0 displays the monthly archive of posts as an elegant list with each month as a heading followed by an unordered list of the month’s posts. My archive page shows what it looks like.
- Upload the whole plugin folder (Blix_Archive) to your /wp-content/plugins/ directory.
- Go to your Admin|Plugins page and activate Blix Archive.
<?php blix_archive(); ?>at the place in your template where you want it to appear.
- You might want to adjust your style sheet to make appearance to your liking.
The template tag, blix_archive, has some parameters:
blix_archive($show_comment_count=false, $before='<h3>', $after='</h3>', $listclass='postspermonth');
If $show_comment_count == true the number of comments will appear in brackets after each post.
$before and $after wrap each month heading. The default values make third-level headings.
Finally, the unordered list of each month’s posts can have a class applied. By default it is ‘postspermonth’.
If the Plugin Output Cache plugin is installed the output of Blix Archive is automatically cached for efficiency.
- Blix Archive v1.0.0 is the original plugin.
This plugin is almost entirely the work of Sebastian Schmieg who created the Blix Theme. I have adapted it to work under WordPress 2.1, made it into a plugin and also made the plugin cache-ready.
If you try this plugin leave a comment here to let me know how you get on.