Blog Posts

Child Themes

16 Dec Child Themes

With the recent release of WordPress version 3.5, I’ve been doing a lot of updates to sites. There are three main parts to every WordPress site that can be upgraded: the core (version of WordPress), your plugins, and your themes. Updating the core and your plugins is often very simple: there’s few customizations on a per site basis with either. Themes, on the other hand can be quite tricky.

Enter child themes. Child themes rely on the parent themes functionality & styling, while over riding it to create easily maintained and updatable themes. A theme without a child theme, when updated, will replace all the files (as it should). The problem, however, is created when you have a lot of custom styles or functions, which then get erased as a new version of the same file is created upon updating.

Note: every theme can (and should) have a child theme. All you have to do is create one.

Here’s how it works: a child theme sits in the same directory (location) as it’s parent (along with every other installed theme), and requires only one file: style.css. Of course it can include every file a regular theme can, and will over ride any file the parent has (if it’s there… if it’s not the site will default back to the parent theme). This allows us to update the entire parent theme, while keeping the child theme in tact, as all theme customizations are in the child theme.

We’ll take a more in depth look at creating child themes with an FTP client later, but just know they’re crucial to quickly updating your site, in turn making everything faster and more secure. If you’re not already utilizing them, I recommend doing so immediately. You can check out more info about child themes, how to create & use them, and more at the WordPress Codex.

Tags:
,
No Comments

Leave a Reply