Minimalist starter themes for WordPress

May 8th, 2013

The first time I made a WordPress theme I simply started hacking the default theme. I think it was TwentyTen. And actually TwentyTen is not such a bad way to start. But if you do fork it, be sure to re-name the theme: you need to re-name it in the style.css file and also re-name the folder it lives it. You don’t want your custom theme overwritten the next time TwentyTen has an update.

Since then I’ve found better ways to build wordpress themes. In the first place y really don’t need a starter theme at all if you have good HTML, CSS, a little PHP, and you know how the wordpress template hierarchy works. You can make a WordPress site simply by taking a clean HTML page (such as boilerplate) as a template, changing the suffix to .php, and adding a little WordPress php code, and a stylesheet.

Be sure to put the key hooks in that run the wordpress core. The essential hooks and stuff you need to have in your theme are:

  • wp_title (for SEO and other reasons)
  • link to your stylesheet (duh)
  • wp_head
  • wp_nav_menu
  • a loop (the heart of WP)
  • wp_footer

You can have a minimalist wordpress theme with merely two files: index.php and style.css.  If you add home.php and single.php templates you can have a little more flexibility (at that point you should probably use a header.php and footer.php also). And if you want to customize the functionality of your site, add a javascript, or anything other than WP default behavior, you will need a functions.php file. So, a basic theme usually has at least these files:

  1. index.php
  2. style.css
  3. header.php
  4. footer.php
  5. single.php
  6. home.php
  7. funtions.php

I generally want a head start when building a theme, and I pretty quickly discovered some nice Starter Themes. The first one I used was Tammy Hart’s very  and minimal Imageless. I still like this one, but unfortunately Tammy has not updated it since 2009. WordPress and HTML have both come a long way since then. Imageless uses an HTML 4 doctype and wp_list_pages for a navigation menu, both of which are obsolete, but it would be easy enough to polish it up for 2013-era code.

What I’ve been using since then are starter themes built on the HTML5 Boilerplate foundation. I have two favorites:

  1. Toolbox. By Ian Stewart. This is the simplest HTML5 starter theme I’ve found. Its own intro reads: “A semantic, HTML5, canvas for CSS artists and an ultra-minimal set of super-clean templates for your own WordPress theme development”, which is pretty accurate. My only issue with it is that it has a lot files for supporting custom post types (aside, image and gallery), but if you edit them out of the functions file, and delete the corresponding template and content files, you will have a very lean starter theme.  And if you want those post types, enjoy the wealth.
  2. Handcrafted WP. By Randy Jensen and Randy Hoyt. Handcrafted is a very useful, and comprehensive package of code. It is based partly on Toolbox in fact, but it adds some nice improvements. It has a great many functions in the functions.php file , which is something I usually don’t like. However most of the functions are disabled, and they are all well commented.  So, you can pick and choose and even delete most of it if you like. There are many functions that clean up some annoying stuff in wordPress (which has gotten a little bloated). In other ways its simpler than Toolbox. It has fewer files overall, and only one loop file. Some templates load the loop.php, some have their loop written in the page.

Leave a Reply

Your email address will not be published. Required fields are marked *