Blix Archive

Description

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 download latest version 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.

Instructions

  1. Upload the whole plugin folder (Blix_Archive) to your /wp-content/plugins/ directory.
  2. Go to your Admin|Plugins page and activate Blix Archive.
  3. Put <?php blix_archive(); ?> at the place in your template where you want it to appear.
  4. 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.

Version

Acknowledgements

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.

Feedback

If you try this plugin leave a comment here to let me know how you get on.

26 Comments Add your own

  • 1. Jesse J. Anderson  |  March 20th, 2007 at 8:34 am

    I used this plugin on my recent redesign and absolutely love it! The only problem is, I use another plugin to do sideposts which I would rather not show up in the archive… I would love it if there was a way to disable certain categories from showing up in the archive.

    You can see my new design (with the Blix Archive) at echofaith.com

  • 2. Rob  |  March 20th, 2007 at 9:37 am

    Jesse: I see the problem. It shouldn’t be hard to introduce the behaviour you seek but it might not happen right away as I’m tied up with other things at present. But it is now on the list.

  • 3. Jesse J. Anderson  |  March 20th, 2007 at 7:44 pm

    Great! Thanks so much. Love the plugin, looking forward to the update when you do get a chance. =)

  • 4. warhammer 40k  |  April 25th, 2007 at 10:22 pm

    i also use this on my private site – its great.
    thank you for this!!

  • 5. Mihai  |  August 1st, 2007 at 2:52 am

    Hi and thanks for this great plugin, I would like to ignore pages created on archives, is there an parametre that I can use ? you can see on this link how I use the plugin, nothing special, just adding the syntaxe in a new template …

  • 6. cburell  |  October 21st, 2007 at 10:51 am

    Sebastian, this wonderful plugin is _almost_ dummie-proof enough for me. I falter on step 3 in your instructions:

    Put at the place in your template where you want it to appear.

    How exactly do we do that?

    Sorry to be thick ~ I’m learning by doing.

    Again, wonderful plugin. Thanks :)

  • 7. QAD  |  November 30th, 2007 at 10:23 am

    Work perfectly with WordPress 2.3.1 and Exec-PHP.

    Thanks for this awesome plugin.

  • 8. maloy75  |  January 11th, 2008 at 11:50 am

    awesome plugin. keep workin’ on it. thans

  • 9. kitaets  |  January 15th, 2008 at 11:58 pm

    Thanks for this great plugin!
    I’ve made a sitemap of my site using your plugin/

  • 10. Rob  |  January 16th, 2008 at 12:05 pm

    QAD, maloy75, kitaets: Thanks for your positive comments. Most of the kudos, though, belongs to Sebastian Schmieg who created the Blix theme.

  • 11. Audun Wangen  |  March 30th, 2008 at 11:44 pm

    Great plugin!

    I believe I found a bug, though. In line 79 $wp_version should also be defined, unless you also want pages to be listed in the archive. So the line should read:
    global $month, $wpdb, $wp_version;

  • 12. Rob  |  March 31st, 2008 at 12:47 am

    Audun: Thanks. I’ll fix it!

  • 13. moserw  |  April 18th, 2008 at 2:03 pm

    Rob great work with these plugins. I am usign all of your plugins with the exception of Blix Archive and Compact Monthly Archive since I am not a programmer and am having trouble getting them to work. Just wanted to say thanks and very much appreciate all the sharing you are doing.

    moserw
    http://www.nela.in

  • 14. Veles  |  April 20th, 2008 at 5:05 pm

    Thanks!!!
    Thanks for this awesome plugin.

  • 15. Lena  |  June 1st, 2008 at 9:57 am

    Hi, your plugin has made life so much easier for me. Love it! Is there anyway i can tweak the code so that only the months will be displayed and not the posts? Thanks so much

  • 16. Rob  |  June 1st, 2008 at 10:57 am

    Lena: Yes, easy to do. I’ll send you the instructions.

  • 17. Putra  |  June 13th, 2008 at 11:12 am

    I love the plug in, perfectly suit my site. Please keep your great work. Next, I would like to assign the archive to a page just like this site. It will be much appracite if you share your knowledge about this.

    Thanks Rob!

  • 18. Rob  |  June 14th, 2008 at 10:02 am

    Putra: Someone wrote up the way of doing this for the compact archives plugin but the process is the same for this one.

  • 19. anouar  |  June 21st, 2008 at 6:11 pm

    thanks for this plugin
    i will try it

  • 20. Mike Wilson  |  November 16th, 2008 at 12:14 am

    Hi,

    Is there a ways to show only posts and not pages?

  • 21. luletube  |  February 27th, 2009 at 8:42 pm

    thank u ;)

  • 22. Cody  |  April 3rd, 2009 at 5:06 am

    I cannot get the post title and the # of comments to stay on the same line. I have tried editing every UL and LI in the php, but no luck. Please help!

  • 23. porno izle  |  April 17th, 2009 at 12:47 pm

    Thanks admin ;)

  • 24. oteller  |  July 2nd, 2009 at 5:47 pm

    teşekkürler admin.

  • 25. konteyner  |  July 2nd, 2009 at 5:48 pm

    I cannot get the post title and the # of comments to stay on the same line. I have tried editing every UL and LI in the php, but no luck. Please help!

  • 26. tatil hotel  |  July 2nd, 2009 at 5:49 pm

    teşekkür ettim.

Leave a Comment

Required

Required, hidden

Trackback this post  |  Subscribe to the comments via RSS Feed