By now, most everyone using WordPress for their website or blog has heard of Genesis, the theme framework created by Brian Gardner and his coders at StudioPress. Most casual users (read, non-geeks) have heard of a framework or two, but don’t really have an understanding for what they are or the advantages to using one. Frameworks have distinct advantages over traditional themes and Genesis has advantages over other frameworks, which is what we’re going to discuss in this article and a later article on Genesis, specifically.
The essential difference of a theme framework vs. a traditional WP theme is compartmentalization. The theme you work with — the child theme — is separated from the core theme — the parent theme, Genesis — and is thus immune from updates to the parent theme. Genesis acts as a gateway to the WordPress functions that evolve over time and eventually make a theme completely out of date. What this means to the basic user is that when they update Genesis and WordPress, they don’t lose the hundreds or thousands of dollars in theme modification because the child theme is untouched.
When WordPress changes
Let’s discuss the “going out of date” issue so it doesn’t sound like a used car sales pitch. WordPress 3.0 introduced custom menus. No longer did you have to go into a theme’s
header.php file and edit the code that called the pages or categories into a menu-like arrangement. It was one of the most common requests of devs back then — “How do I add x to my menu?” — and often created very creative code that there was no way the site owner could change it again without paying for more changes.
It’s funny to think back to WP 1.6 or so and remember the need to populate sidebars with PHP code, themes weren’t “widget-ready,” widgets didn’t have CSS-identifiable IDs and classes, and people spent a fortune on rotating header images because the default Kubrick theme had it, but their premium theme didn’t.
Then WP updated and added widgets, menus, etc. and their entire site was suddenly very lacking in the dashboard abilities that were barren because their themes didn’t know what to do with all of these cool functions. They were up a creek without a paddle.
Introducing child themes
A couple of major theme developers began allowing and instructing their customers about child themes so they could edit certain page templates and the stylesheet without those changes disappearing when they came out with another release of the premium theme they just shelled out $30-$299 for. Mimbo Pro by Darren Hoyt was one of the first successful premium themes to help people out with child themes. I used Mimbo Pro for one of my sites for several years and still have some clients running it because we used a child theme for it and extended its life that way.
A child theme needs 1 file in order to work:
style.css. This file points at the parent theme and overrides any styles (the main source of formatting changes to a theme). You can also add a custom functions.php file to override or add any functions to the parent theme and also any template files such as archives, blog index pages, or a custom homepage/front page. All of these files are then immune from updates to the parent theme — that is, in the vast majority of upgrades, nothing will break or disappear when updating the parent theme, usually only new features appear.
At one point, Genesis changed the syntax of their menu CSS. Thesis, the other major framework, did once, also. What happened when we upgraded the parent themes in those instances is that we lost any customizations to the menu CSS that referenced the modified syntax. So if we edited
#nav-menu repeatedly in the child theme, and the menu itself changed to
.menu in the parent theme, we then needed to edit the child theme to reflect the new menu CSS. It was a simple matter because so little usually changes that affects the design and functionality. I can only think of a couple of widgets that have gone away over the last 24 months, but the code was still present in depreciated areas of the theme… just in case anyone was still using them.
Moving on with the next article, we’ll discuss Genesis specifically and why I use it exclusively for every project and have for since 2011.
Did you enjoy this article?
get posts delivered to your inbox