SRG Clean Archives

POSTED IN ON 30 Apr 2007

Welcome to the official SRG Clean Archives project page.

As of version 2.1 I have taken over development of the SRG Clean Archives WordPress Plug-in originally written by Shawn Grimes.

Plugin description: This plugin is designed to display your archive listings in a clean and uniform fashion that’s Search Engine friendly on a dedicated page or in your sidebar.

Plugin Features: It lists the Month / Year, shows total post count for the month (enabled by default), the day of the month the article was published, the title of the article (permalink to article) and the number of comments (enabled by default) that have been made on each article.

If wanted, you can toggle on/off the moo.fx for collapsing months (on by default). If moo.fx is not enabled, your full archive display is shown but it’s still using the caching function.

For those of you who’d like to have the standard WordPress paged archives as well, there is now an option to toggle on/off the link display (on by default) which reads “Detailed Monthly Archive” and goes to your paged archive view for that month.

You can also toggle on/off hiding password protected post display (off by default) from showing up in your archives list.

All the above features are controlled via the plugin admin page (see readme.txt for details).

Plugin Localization: Per a few user requests, the plugin is now completely localized using language files created with poEdit.

Current available language packs: English (default – built into plugin), French – Francais and German – Deutsch. They can be downloaded at the bottom of this page.

See the plugin readme.txt file for more information on how to use language files with SRG Clean Archives.

Plugin Demo: Archives page.

How do I use it:

Upload the contents of the downloaded ZIP file to your plugins folder located at “/wp-content/plugins/” while making sure to
keep this plugin’s file structure intact.

You should end up with a folder called “srg_clean_archives” in your plugins folder and some files and a folder called “moo.fx” inside of that.

Go to your WordPress dashboard admin area and activate the plugin from the plugins page.

Creating Archive Page

Create a page like you normally would in WordPress. In my example, we’ll give it the page title of “Archives”. In the Page Content
section add the following code:


For those of you using the new rich-text editor – be sure to click the ‘html’ button to edit the page source directly. Otherwise WordPress
will wrap code tags around the line which generates the archives output and it will not work properly.

Also, make sure under ‘Page Template’ you are using ‘Default Template’ as some WordPress themes have an archives template.
Press the publish button and you’re done. You’ll now have an archives page. If you want, you can also add text above the archives page
code as seen on my site

Adding Archives To Your Sidebar
If you would like to have your archives in your sidebar, you would use the following function call code:

<?php if (function_exists(‘srg_clean_archives’)) { srg_clean_archives(); } ?>

If you need any help with getting this going, let me know.

Plugin Admin Menu
Go to Plugins, then submenu SRG Clean Archives in your WordPress dashboard. From there you can adjust the following:

Toggle on/off showing total post count next to month (on by default).
Toggle on/off showing total comment count next to post title (on by default).
Toggle on/off password protected post display (off by default).
Toggle on/off the moo.fx for collapsing months (on by default).
Toggle on/off showing link to detailed monthly archive (on by default).

Make your selection(s) by checking the box and pressing the update options button.

Adding CSS Styling
The list of of articles can be styled in your CSS by setting up a .postspermonth class.


.postspermonth {
margin: 5px 0 10px 0;
list-style: none;
padding-left: 25px;

The output from this plugin is already wrapped in the needed <ul class=”postpermonth”> tags. All you need to do is customize the
class to your taste.

The Month/Year format is surrounded by <strong> </strong> tags. If you would like to change this, just open up the srg_clean_archives.php
file and look for the following line of code at line 146:

$output .= ‘ from ‘ . $text . ‘”><a href=”#’ . $monthresult->year . ‘-‘ . zeroise($monthresult->month,2) . ‘”><strong>’ . $text . ‘</strong></a>&nbsp;';

There you can change the current tags to whatever you would like to use. Such as a h2, h3, etc. and resave the file. Just be
sure not to delete the quote marks.
Download Clean Archives:

Current version: 4.3 Supports WordPress version 2.5.x and 2.6.x only).

Previous version: 4.2 (Supports WordPress versions 2.1.x thru 2.3).

Older version: 2.1 repackaged as 2.2 (Supports WordPress 2.0.x).

Keep in mind version 2.2 does not have all the cool features of the 4.x series and is for people who are running the 2.0.x branch of WordPress. Upgrade your install today.

Download Plugin Localization Language Packs:

Currently available language packs:

Change Log:

Version 4.2 – released September 23, 2007
Version 4.1 – released June 21, 2007
Version 4.0.3 and 4.0.4 – released May 29, 2007
Version 4.0.2 – released May 27, 2007
Version 4.0 and 4.0.1 – released May 25, 2007
Version 3.0.1 – released May 16, 2007
Version 3.0 – released May 15, 2007
Version 2.1 – released January 27, 2007
Version 2.0 – released May 4, 2006
Version 1.0 – released April 28, 2005

Leave a reply