Site icon Mostly Harmless

Blog re-theming

How my blog used to lookI’ve been using a modified version of the FastTrack theme by Sadish for a couple of years now. It’s a good theme but it’s designed for a 800×600 resolution screen. Most of the visitors to this website use 1024×768 and on my screen it looked narrow. I felt like I was wasting screen real estate.

So after trying out lots of different WordPress themes, I settled on one called “The Journalist” by Lucian E. Marin.

This new theme has two columns with the main column wide for text. It’s easy to read and I did not change much except add some plugins and a banner at the top.

Adding the image at the top was easy. I took a version of a rotating script that I put together for Stefan’s blog and made it a separate file and where ever I wanted to put the image I just inserted this line into the php file:

<?php include(TEMPLATEPATH . '/rotate.php'); ?>

A copy of the php script can be found here. This one line was inserted into these files 404.php, archive.php, index.php, and single.php. I also create come page templates by copying the index.php and removing the post code inside and replacing it with code for the sitemap, archives page, etc.

In the journalist/images directory I made a new directory called random and placed some 700×175 jpegs there. When the rotate.php is called, it creates a list of images and populates it into a javascript. It’s convoluted but guarantees a random image with every page load.

The images were lifted from Stefan’s Flickr account with permission. If you like one check with him before you use it. I used the Gimp and set the rectangle select tool to a fixed aspect ratio of 700×175. Loading up the highest resolution image available, I was able to cut what I wanted, crop it, and resize it.

In the past I’ve made all my changes to the sidebar in sidebar.php. Widgets are lots easier, so rather than keep beating at the sidebar.php, I just use widgets now and it’s all good.

With this theme I’m using XHTML Transitional 1.0 instead of Strict. It’s easier to work with and more forgiving. I still switch to HTML in the blog editor to fix the image layout by hand and upload the images seperately. With WordPress 2.5.1 TinyMCE adds CSS classes to the img tag so I may just add those tags to my style.css and leave it at that.

Exit mobile version