[wp-hackers] child themes of child themes (grandchildren)
otto at ottodestruct.com
Fri Nov 9 18:54:47 UTC 2012
On Fri, Nov 9, 2012 at 11:23 AM, Shasta Willson <shastaw at gmail.com> wrote:
> On Fri, Nov 9, 2012 at 9:11 AM, Otto <otto at ottodestruct.com> wrote:
>> It's a sanity thing. Essentially, child themes are fine, while
>> grandchild themes take it a bit too far.
> And yet languages like Java handle inheritance gracefully without such
WordPress is a CMS, not a programming language.
>> If you need to customize
>> further than a child theme, then you're probably doing it wrong to
>> begin with and should look at alternatives.
> Ok, I'm game... I have clients come to me regularly and say "I want the
> Crystal (Genesis) theme." I said "sure!" and install it. Then they say
> "Oh...but I wanted a dark upper portion, and instead of a slider on the
> front page I want some other custom thing, and by the way can I have this
> other dodad over here.. and...
> And by the time I'm done what I have is no longer the Crystal theme, but a
> child theme of Genesis based on Crystal. Which is fine in as far as it
> goes, but obviously if Genesis is updated and Crystal is updated to
> coordinate with the changes my client is left with no upgrade path but to
> pay me more money to update my customized version of Crystal.
> Obviously I do use best practices like utilizing the hooks to keep as much
> of the modification in one place as possible, but that doesn't change the
> fact that I'm right back to the situation children were invented to fix: no
> upgrade path.
> So what's the "right" way to handle this client's request for
> "Crystal...but not quite."?
Not to dismiss your question, but have you asked the Genesis folks
what they think the "right way" is?
While there's always one or two right ways to do things, they're not
always the same for all cases. Different use cases mean different
solutions will exist.
See, I fully agree with Mike in that when you have a hammer,
everything looks like a nail. In this case, a normal theme would be
the nail, and a customized child theme would be the hammer. But
systems like Genesis have taken that nail and added threads to it,
turning it into a screw. So while you can use the hammer to stick the
screw into the wall, the wall will come out all wonky and it probably
won't hold up your pictures very well. Perhaps you should ask the
manufacturer how to use the screwdriver they've provided you with.
Child themes were never really intended to solve the problem of
customizing a theme. They work well for that, for normal themes, but
originally they were intended for something more like the Sandbox
theme. Sandbox, if you're not aware, was one of the first "generic"
themes that could be easily changed entirely by simply writing a bunch
of new CSS. Child themes were modeled based on that principle, and
made a bit more generic because generic is always a bit better for
core. Making custom changes for a site in a way that would survive
upgrades of the parent turned out to be quite handy this way, but that
was not their original purpose.
There's other ways to make customizations survive upgrades. Put them
in a plugin, for example. It's surprising how much you can change from
a plugin. Or try to limit your changes entirely to CSS (always a good
idea in any case), and then put those changes in using Jetpack's
Custom CSS feature. These are better alternatives even for "normal"
themes too, and systems like Genesis and such may have other
mechanisms as well that would suit your needs better. Ask them about
More information about the wp-hackers