Categories
AMA

Q&A: Child theme bloat and when to build a new theme

I got these questions from a lynda.com viewer earlier today. They are fairly common so here are the questions and my answers. Keep in mind that everyone who works with WordPress or on the web in general has strong preferences one way or the other, so if you disagree with anything I say, leave it in the comments and let’s discuss!

Now for the questions:

I wondered if I could trouble you to ask just two broad/philosophical questions regarding child-themes? These are pretty “general interest” questions….

  1. If it includes a lot of CSS/template files, does a child theme eventually slow down the loading of a site? It seems that it would, since the child theme is overriding the parent theme, not replacing it. Is this true?
  2. At what point should I be taking a theme (like twentyten or other) as a starting point and build my own theme, rather than building a child theme? It seems that, at some point, if one overrides much of the original theme, there seems to be less benefit gained from parent theme updates etc. and an increased risk of having a really bulky site. (Though I’m not sure I’m experienced enough to build a complete theme quite yet without missing something important – like security etc.)

I’d be really interested to hear your thoughts, if you have a couple of minutes to share them.

Thanks, Jodi

Child Theme Bloat

A child theme doesn’t really bog down the site any more than a regular theme, even if it is completely rewriting all of the parent theme. Let me break it down for you:

If you use @import or another method to load the original stylesheet, then you are loading two stylesheets, but WordPress stylesheets are relatively small and uncomplicated so it’s not that much of a tax on the server. If you roll your own styles entirely, you are just loading one stylesheet.

The parent theme functions.php file will always load along side your child theme functions.php file, but again these files are relatively small so the tax is negligible.

If you make any other template files in your child theme (header.php, index.php, new_cusom_file.php) these will be loaded in place of or in addition to the parent theme files. In other words you’ll never load both the parent theme and the child theme template file and then only display the contents of one of them.

Themes from scratch

As for when you want to build a theme from scratch, that’s a bit more complicated to answer. I build all my themes from scratch because I want full control over everything. I always work from custom designs created to match client or project criteria and rarely start off with something that can be easily built from an existing theme. I’m also obsessed with clean code, standards, and modern approaches so building from scratch every time allows me total control and room to always stay on the bleeding edge of what is being done.

If you design a site from scratch and want it to do specific things, building a theme from the bottom up is often a better idea. But, if you find a theme that already has the majority of what you need, customizing it with a child theme is a lot quicker and easier and will make upkeep easier to handle.

If you want to build your own theme from scratch there are many places you can start. I personally like to start with as little interference as possible so I use a highly personalized version of the _s (“Underscores”) theme. _s is about as stripped down as you can get and to use it you have to do a lot of work, but you also have complete control.

If that’s too stripped down for your tastes there are other great themes to start with including Toolbox. Some developers prefer starting with frameworks like Responsive, WP Fondation, WP Bootstrap, or others, but I think these are colossally overloaded and end up bringing a whole new range of complications.

I have no perfect answer for you on this one. My best suggestion is to master the art of the child theme and then take those skills and apply them to a starter theme like _s.

Hope that helps!

Categories
AMA

My Wooden Monkey – answering a question from a viewer

I get a lot of interesting questions from viewers of my lynda.com courses, and I’m going to start using some of them as material for articles and tutorials posted here on Design is Philosophy. Today I got a question from Pete that I thought is a good place to start. And no, it has nothing to do with web design, development, or anything like that. It’s about my wooden monkey:

I recently took your Intro to WordPress course at lynda.com. The course was very helpful and I have developed a website for a local RC club that I am a member of.

I do a little woodworking as a hobby and was trying to find a little more about your wooden monkey. Is there a link to where the monkey was purchased? It looks like his joints have the ability to move and his feet and hands look like they give him the ability to hang on to something. Finally how big is he?

Thank you,
Pete

Mor10 and his Kaj Bojesen wooden monkey
The Kaj Boyesen monkey with my head as a size reference

The monkey in question, pictured here next to my head, is a gift I got from my parents for my birthday a couple of years ago. It’s a wooden toy designed for children that has become a staple of Danish design. Designed by Danish silversmith Kay Bojesen in 1951 it is made of teak and limba and you can move the head, arms, and legs around (they are connected with an elastic band). The monkey is the most famous of his wooden toy designs which also include an elephant that can stand on its trunk, a bear, a dachshund, a parrot and some other animals. You can’t tell from photos, but the wood is not varnished. Instead it is oiled with a natural oil so you can safely hand the monkey to a baby without worrying about it being chewed on. To keep the monkey healthy it needs to be treated with oil every now and then.

You can see the monkey and his buddies at the official Kay Bojesen website but I have no idea where you would get a hold of one in North America.