Twenty Ten Child Themes

Yes, you heard me right. I’m going to write about how to setup a child theme for Twenty Ten.

Thematic Child Theme left a bitter taste

My first encounter with child themes was with Thematic.   I hated them.   The CSS was buried in a file that wasn’t visible to the theme editor.   To change the CSS was so convoluted involving Notepad and lots of FTP of the style.css file to see any changes that I swore I would never work with child themes.

Twenty Ten as Default Theme

As much as I’m loving Twenty Ten there is one glaring issue.   Every time there is a WP upgrade or Twenty Ten upgrade all the files in the theme are replaced.   Three time now I have accidentally wiped out all the CSS and code modifications I’ve put in place.   Ex.   Analytics tracking code in the footer.php   GONE after the upgrade.

While I was in “fixing” the functions.php file for the header image size I wanted I noticed the recommendation from WP code to create a Twenty Ten-child theme to avoid having customization wiped out during updates.   Yeah, that caught my attention.

There was a link to the WP Codex on creating a simple generic child theme for Twenty Ten.   This morning I decided it was time to try it out on one of the new Lab Rats.   (The problem with my Lab Rats are they grow so big I don’t want to risk them any longer so I have to create new lab rats)

Twenty Ten Child Theme a thing of beauty

I followed the short simple instructions and in about 5 minutes had a child theme up and working.   It only took a few minutes more to start making all my Twenty Ten sites into child theme sites.   The css and any custom template files like footer.php are visible in the editor.

There are a couple of things you have to reset by hand when switching   (ex. header images, background, . . .)   which are locked to the parent Twenty Ten install but not carried over to the child.   But other than that it is a snap and I don’t have to worry about forgetting to back up my theme files before I hit the upgrade button.

In the next post I’ll take you through the simple steps to create a child theme for your Twenty Ten install.   While you can find all this information at http://codex.wordpress.org/Child_Themes I’ll walk through the steps I did in the typical Lab post format.

I love so many things about the growth of WordPress with version 3.0.   It is out of adolescence and maturing nicely.

Expect that post either later today or tomorrow.

Comments

  1. I am following you now. I want to make a child theme myself. Thanks for this useful post.

  2. Now I know why my ears were burning.
    kk

  3. Ohhhh, they should burn 🙂