Weblog Archive

Serving fresh

Wed, 13 Jul 2005 at 12:40 • Chyetanya Kunte • Filed under Blog, Geekspeak

Oh, I just came up with that name for the (test) archives section, which is apparently in high demand for my theme, Plain Vanilla, and I’m sorry for not providing this earlier on. I wanted to get this done quickly, without really making much of an effort.

The method of creating a page (using a template like archives.php provided in the default theme, Kubrick by Michael) that would have a simple Archives markup of Months and Categories wasn’t working with nice archives. It has probably something to do with the way WordPress 1.5 is structured, I don’t know. But, if you put those functions from narchives.php in a file and call it a plugin, take out the template-tags, activate the plugin, then and put those template-tag markup in a file like archives.php, it would work (in theory). I haven’t tried it yet.

For the quick and dirty, I chose to go with Justin Blanton’s smart archive plugin for the test archives page that pretty much does the job, although it is not sortable or organizable like nice archives.

I added a wrap to the function call so that it doesn’t spit errors if the plugin is not activated:

<?php if (function_exists('smartArchives')) { ?> <?php smartArchives(); ?> <?php } ?>

and another for Get Recent Comments plugin:

<?php if (function_exists('get_recent_comments')) { ?> <?php get_recent_comments(); ?> <?php } ?>

What I really wanted to do with Plain Vanilla was to adopt the expandable live archives, but due to space constraints, I don’t think it would look elegant on my theme. But, I’m still thinking about it.

In the next version of Plain Vanilla, I’ve cleaned, scrubbed and have made the entire code leaner. It has now all the default files a good theme has and yes, I’m vying for that spot on WordPress.org’s extend > themes =)

The top nav bar: I have always been pained to see that people have to resort to adding links manually when I could have easily inserted a template tag to display the titles of Pages created like this:

<?php wp_list_pages('title_li=') ?> // Notice that there’s no-space after equalto sign.

The only problem was that if you have more than a few pages, then, the navbar links will be forced to go down the second line in the layout since the navbar only occupies 50% of left-hand-side division.

I’ll be adding all this stuff to the new version so that it works right off the box. The template already supports Live comment preview, no special code required. I’ve also modified the div to enclose posts are required by Touched plugin. I haven’t tried it yet, but it would work (in theory). It works!

If you’re in a hurry to get the archives and or the navbar, go ahead and use the above simple way to enhance your blog / site. If you’d like to wait (and I’m sorry for not committing a time-frame for this), I promise, I’ll release all this and probably some more sweet-nothings in the upcoming major overhaul in 1.2 of Plain Vanilla. This overhaul has more to do with the perception of whipping-up a semi-intelligent code than the layout’s visual presentation.

I’m also thinking of making images rotate by default and for that, I’m looking for a suitable image rotator for the banner where people can just dump pictures in a designated folder and the banner would pick-up images at random. May be I could use Matt’s. I’ve also got to get a hack for IE 5 Win that apparently throws the alignment out.

Suggestions for improvement in visual appearence, for the pleasure of your functionality, and support for any plugin natively in the theme are welcome. I’ll try my best.

[ Ads ]

Related posts

Following list is auto-generated, based on this post's context as possibly related. You may, however, occasionally find some in this list unrelated, but nevertheless, we sincerely hope that you'll enjoy them too.

2 responses to “Serving fresh”

  1. A to the L said:

    I’m using the plain-vanilla theme on my site, and run a simple random image script to rotate my main title banners between 5 or 6 different ones. Let me know if you want it - it works perfectly!

    I’m having real trouble creating any kind of archives page for my site - I guess I need an idiots guide.

  2. Chetan said:

    Check out my archives for dummies post =).