I was working on a WordPress theme recently, for a site with a not insignificant volume of posts, and found myself needing a fancy, more user friendly way of presenting the archives.
After a search of the WordPress extend repository I came across Smart Archives Reloaded by Scribu, an evolution of the original Smart Archives by Justin Blanton and while it didn’t quite achieve what I was aiming for I could see the potential to get where I was going… so I rolled up my sleeves, put my php hat and started coding.
The new fancy archive is built using a multi-level implementation of the jQuery.Tools tab control and also adds post categories and dates to the list of output tags available. After a couple of days of tweaking and testing I got in touch with Scribu to present “Super” Smart Archives Reloaded. Needless to say he loved it and offered to roll it into the core plugin.
So from version 1.7 of Smart Archives Reloaded you too can now take advantage of the “fancy” archives option and enjoy the smartest archives on the web!
You can see the archive in action here or go download it and try it for yourself… it’s as simple as upload, activate and view, and it even comes with a simple default style!
This is only my second WordPress plugin and my first to see the light of day and it feels great to give something back to the WordPress community. Thanks to Scribu for including my work in the plugin.
Great work Simon, this is a great enhancement. I just might nick it.
Nick away… that’s why you gotta love GPL
Awesome man.Cool
Hey man, love the plugin. Is there a way to list the excerpt for only the most recent post in the month?
Hi Brian
No sorry, there’s no way I can think of to easily achieve this programtically (with my limited PHP knowledge at least). Scribu, the original author/maintainer of the plugin, may be able to suggest a solution if you ask over on the main plugin page.
I had a play around however and you can achieve what you’re after with a little jQuery/CSS magic! (I’m not suggesting that this is by any means the best way to do it and is is certainly not as elegant/clean as doing it in the php).
In your list format field on the Fancy Archives option screen add the %excerpt% place holder wrapped in a span and give it a unique class name:
Then in your theme’s stylesheet add:
span.archive_excerpt { display: none; margin-bottom: 5px; }and finally in the theme’s header.php file add the following script:
<script type="text/javascript"> $(document).ready(function($){ $('.pane ul li:first-child span.archive_excerpt').css("display", "block"); }); </script>And you’re done!
I did note while testing this though that there seems to be a bug in the way the excerpt is added to the archive. If a post doesn’t have an excerpt it displays the excerpt for the archive page itself.
I’ll raise this issue with Scribu so it will hopefully be fixed in a future release of the plugin.
Hope this helps!