Journal and portfolio of Saddam Azad, UI Designer & Front-end Developer

Better Archives for WordPress

Archive pages are tend to be boring and cumbersome. These pages are usually simply a list of months that the blog has been active for or a list of categories.

Introducing Better Archives for WordPress, a simple plugin that gives you a neat template for Archive pages.

I wanted something different for my blog. Not just a list of months, but a rather good looking listing of all the articles published, so that the page doubles as a sitemap of sorts.

I came across Justing Blanton’s Smart Archives for WordPress plugin that serves the purpose of creating lists of articles by year and month.

I made some major modifications to his code to serve the purpose of my site. Without further ado, here is the plugin:

DOWNLOAD BETTER ARCHIVES FOR WORDPRESS

Installation

1. Extract smarterarchives.php and place it in /wp-content/plugins directory

2. Install the plugin from WordPress administrator panel.

3. Create a new template file (or modify the existing archive.php) and place this where you want to output the Archives List. Make sure it is enclosed within php tags.

wp_better_archives();

4. Apply the following CSS and customise it however you see fit:

/* Archives page */
.archives {}
.archives .year {
clear: both;
font-size: 30px;
line-height: 48px;

border-bottom: 1px solid #CCC;
width: 100px;
float: left;
}

.archives .wrapper {
float: left;
width: 810px;
overflow: hidden;
margin: 0 0 20px 0;
}
.archives .month {
width: 375px;
float: left;
overflow: hidden;
margin: 20px 0 0 30px;

}
.archives .month h2 {
font-size: 20px;
border-bottom: 1px solid #CCC;
padding: 0 0 10px 0;
}

.archives ul {
margin: 10px 0 0 20px;
}
.archives ul li {
padding: 0 0 10px 0;
list-style: square
}

And that is all!

You should have a clean, great looking archives page just like this.

Thank you for reading

I am Saddam Azad, an experienced User Interface Designer and Front-end Web Developer living in London, UK. I publish articles here and maintain a social networking stream with the intention of helping the web community and those who are starting off in this field.

There are no comments. Be the first!

Leave a Reply

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