New Theme, Updated Code

I’ve decided on a theme for my blog that I feel comfortable using without tweaking the design too much more. I’ll still be making minor tweaks and enhancements, but at least I won’t be devoting all my blogging time to making a design. Since I’m mostly content with it, I’ll be able to devote a larger portion of my time to actually writing new content.

The theme I chose, though, was only written and available for WordPress 2.5. I know how to work with PHP and HTML/CSS, so I jumped right in to make the modifications necessary to support the new WordPress 2.6 and 2.7 features. WordPress 2.7 added an entirely new comment loop and threaded comments, therefore most of the comment code had to be rewritten to support it. In addition to that, a new function was added to get the classes used for styling each entry:

The post_class() outputs the class=”whatever” piece for that div. This includes several different classes of value: post, hentry (for hAtom microformat pages), category-X (where X is the slug of every category the post is in), and tag-X (similar, but with tags). It also adds “sticky” for posts marked as sticky posts. These make it easy to style different parts of the theme in different ways.
[http://codex.wordpress.org/Migrating_Plugins_and_Themes_to_2.7]

Besides the required changes to make the theme work fully with WordPress 2.7, I also added in a few personal features. First, I made the H1 on the pages dynamic. It was originally constructed so that the title of the blog appeared in the H1 for every single page. I have seen it written multiple times that the title of the blog should only be in an H1 on the main page of the blog. On the individual content pages, the title of the content (post or page) should be contained within an H1. This is supposed to help with SEO. Second, I added my Twitter loading javascripts to the footer. With the load script in the footer instead of in a widget, only a very minimal portion of my site doesn’t load if Twitter goes down. Third, I added my Google Analytics code to the footer as well.

Here's a screenshot of the new threaded comments. Notice the 'Reply' link on the left side if a comment can be replied to.

Here's a screenshot of the new threaded comments. Notice the 'Reply' link on the left side if a comment can be replied to.

I would like to make a settings panel for administering options for the theme, such as my new Google Analytics and Twitter support. I feel that this would be useful for myself, but possibly more beneficial to others. If there is sufficient demand (or any :) ), then I may try to contact the authors of the dark theme for WordPress to see if I can release my own version. If I do that and get permission, I will definitely be adding a settings panel with a multitude of options.

Leave a Reply

Please be polite and on topic. Your e-mail will never be published.