Skip to main content

customizing wordpress

Pia, My CatI've been experimenting with creating custom themes in WordPress, one of which is the interface of this blog. WordPress is remarkably easy to customize.

The first time I did this was for Dairy and Animal Science blogs. It is not what I would call perfect yet. It was also a tiny bit more complicated because

  1. I picked a theme that contained rather a lot of embedded styles that had to be pulled out of the php files.

  2. I created several php includes and moved them outside the WordPress instances so that I could manage the appearance of several blogs with just a few files.

  3. Ditto the css.

  4. Ditto the images.

  5. I created some new php functions and changed others, which isn't necessary in most cases.


Almost SpringFor the blog you are reading, I started with the Almost-Spring theme, designed by Becca Wei. Becca's style sheet is well organized and semantic, so it was easy to work with. I commenced from there.

I downloaded the files from wordpress.org/extend/themes. There are zillions from which to choose. Each consists of an image directory, a screenshot.png, several php files, and the stylesheet.

Except for minor tweaking, I was able to leave the php files alone. It was largely a matter of altering the stylesheet, replacing the images within their directory, and replacing the screenshot with one of the newly created theme.

File structure for each theme.


I added an icon file named pia.ico to the root of this directory, and placed the following code in header.php between the header tags:

ICO Code


Finally, I changed the footer to reflect the new design.

Since this blog is hosted at an ISP, I do not have direct access to the code, so it was a matter of zipping the directory and uploading it. I was then able to choose the new theme from the theme selector.

That's all there is to it.

One thing I noticed about the code generated by this and some of the other WordPress themes is that the XHTML throws a validation error until you create your first post, at which time the error disappears. This is because posts are listed in the sidebar using an unordered list, and a fragment of a list tag is tied in with a php variable. So until there is at least one post, WordPress generates a closing tag without an opening one. Create a post; eliminate the error.

A small thing, really.

One last point: If you decide to customize your own WordPress blog, do remember to validate your XHTML and CSS and fix any mess-ups. The world does not need yet another site with trainwreck code.

Popular posts from this blog

the case for incremental redesign: part i

Consider the dashboard of your automobile. Aside from a number of extras that have crept in over the decades, it's essentially configured the same as the dash of the car you drove as a kid. In fact, the design of the automobile's critical controls hasn't significantly altered since the Model T Ford. It's worked for more than 100 years, and we love it.

facebook, time to grow up

Originally published on August 28, 2006 I appreciate how Facebook has enabled me to connect with colleagues, and (younger) family members in a manner that is both informative and expressly cordial. It attracts students like Nutella attracts chocolate lovers, and because of that, I see interesting potential here. In fact, one of our faculty members at Penn State plans to try running his human-computer interaction course through Facebook this fall . Definitely worth pursuing.