June 29, 2009 update: Since posting this entry, I have redesigned this blog and others using the Thesis Theme, because it is easier to configure and provides additional tools for improving my blog.

In creating this blog, I started with the 3-column version of the Blue Zinfandel Enhanced theme created by Brian Gardner. I like the 3-column layout he uses, because it allows me to present the main content in the middle, use one sidebar for the blogging stuff (like recent posts, categories, and the blogroll), and have an extra sidebar for whatever I want to display – in this case, cover images of books I’ve written.

CSOdessa Modification

One of the problems I ran into with the original version of the template is that to change what appeared in the right sidebar, I had to edit three separate template files. That meant putting the <img> tags for the book covers in three different template files. Brian designed the template intentionally this way, because he wanted to be able to display different content in the sidebar depending on which page the visitor chose to open.

I searched the Web for some instructions on how to make the template function more like a standard template and finally stumbled upon a modified version of the template that went far beyond what I had expected: Blue Zinfandel Enhanced modified by CSOdessa. In addition, this modified version is widget-enabled, which made it much easier to customize both the left and right sidebars.

Adding Comments to Pages

Another problem that I ran into with both Blue Zinfandel Enhanced and the modified version, was that I had trouble adding a comments box to static pages. With other WordPress Templates I’ve used, I could just open up the page.php template and add the following code:

<?php comments_template(); // Get wp-comments.php template ?>

The contents of my page.php file would then look something like this:

<?php get_header(); ?>
<?php include(TEMPLATEPATH.”/l_sidebar.php”);?>
<div id=”content”>
<div id=”contentmiddle”>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<h1><?php the_title(); ?></h1>
<?php the_content(__(‘Read more’));?>
<!–
<?php trackback_rdf(); ?>
–>
<?php comments_template(); // Get wp-comments.php template ?>
<?php endwhile; else: ?>
<p><?php _e(‘Sorry, no posts matched your criteria.’); ?></p><?php endif; ?>
</div>
</div>
<?php include(TEMPLATEPATH.”/r_sidebar.php”);?>
<!– The main column ends  –>
<?php get_footer(); ?>

That sort of worked this time, but when I disabled comments for a particular page, I would get the “Comments closed” message, but the Comments form would still appear.

To fix this, I had to edit the comments.php file. I moved the following lines from near the middle to near the end, between the two closing </div> codes:

</div> 
<!– If comments are open, but there are no comments. –>
<?php else : // comments are closed ?>
<!– If comments are closed. –>
<p class=”nocomments”>Comments are closed.</p>
<?php endif; ?>
<?php endif; ?>
<?php if (‘open’ == $post-> comment_status) : ?>
<?php endif; // If registration required and not logged in ?>
<?php endif; // if you delete this the sky will fall on your head ?>
</div>

This change seemed to do the trick.

I also changed the header from the modified version back to the original, which I prefer. I will be making additional tweaks later.

I take my hats off to people like Brian Gardner and the developers at CSOdessa. I can fiddle with these templates and make them work, but to design something from the ground up that works and is beautiful is a real art.