Are child themes the best option?

I’ve been meaning to write about my opinion about child themes for a while now: basically, I think they’re over rated and unnecessary for almost all instances that I can think of.

I do agree with Andrew here, I never really thought about building modules out of plugins. Instead I tend to bring in custom functions that are organized within a functions directory (that I individually call from the main functions.php file). It’s almost as if I have a plugins directory within my theme and I activate those modules/functions/features within the functions file. Lost yet?

Anyways, maybe the reason I don’t like the idea of child themes is I don’t see any advantage other than not having to build a theme switcher in an options panel–which I’ve already done.

Frameworks is a different story entirely, short answer: KISS. Only the large scale projects where you need one framework to manage multiple sites that each have unique layouts and options would a framework work. Otherwise, just build it as you normally would and stop worrying about hooking into template sections and trying something more complicated than it should be.

(via Are child themes the best option?)

Child themes have been gaining popularity recently but there still seems to be a great amount of confusion involved and I wonder whether they are the best option, despite their popularity.

In the beginning the big thing about child themes was the ability to create a child theme so that you could modify it and yet still benefit from updates to the main theme. That quickly moved on using child themes as the presentation layer of a framework, to offer a theme based on that framework to other users without needing to get into the actual framework code which would likely be updated.

Now it looks like themes are being released with bundled child themes so as to offer extra graphics. I don’t think I have seen a theme with bundled child themes where there is different functionality involved, but I may just have missed them.

Unfortunately some of these instances result in the need for ‘grandchild’ themes, and that is not a relationship you want to investigate.

Aside from the first option, the uses all seem to have something in common which is separation of logic and presentation and I can’t help thinking that if you want to bundle a whole load of extra functionality without explicitly attaching the means to display it then plugins would be ideally suited.

This isn’t a new thought, to be honest I have been harping on about using plugins to moduarlise themes for a long time now to no effect, but the more complex the underlying theme becomes the more I am convinced that a plugin or indeed several, might be a better option.

I can quite easily find reasons not to do it: firstly you are asking the user to turn on more than one thing which some believe is undesirable. Personally, I find the option to turn bits off to be very beneficial but of course you have to minded to build in that level of control.

Secondly, by making it into a plugin you open the gates for others to just use what you have produced in their own themes. Of course they can do this already, but plugins are designed to be reusable, that is point, whereas masses of code in functions.php (or however many other files) is certainly harder to work with.

Finally, if it ain’t broke…

Despite these things though I think there are some significant advantages to using plugins and keeping functions.php as light as possible. I’ll leave you to think about what those might be.

About the Author, Dan Cameron:

I'm the owner and solution engineer at Sprout Venture, a web solutions company that specializes in web development including WordPress.

I started my first blog in 2003 and transitioned to WordPress in 2004. Since moving to WordPress I've written a few plugins and themes for public consumption. Lately I'm busy engineering/building/coding and have only been able to share a few code snippets.

If you're in need of some web development, web design or custom WordPress plugins and/or themes contact me, I'll be happy to discuss it with you.

Read More »

blog comments powered by Disqus