Contact Us
  • An Introduction to WordPress Theme Frameworks and Child Themes

    What is a WordPress Theme?

    A WordPress theme is a collection of PHP and CSS files that change the appearance of your site without changing the content, which is stored in a database. This allows you to easily change the presentation of your website by switching themes, while the content remains.

    To use a metaphor, the Theme system provides a “skin” your website while WordPress is providing the “bones” of the site in its underlying code. The Theme, or “skin,” is the way in which WP is told how to display information to the browser through page templates, css files and other scripts. The “bones” are the WordPress core files, which communicate with the database, build the UI (user interface), and provide the main structure for WordPress as a content management system (see Using Themes).

    The Appearance Themes Screen in the WordPress back-end (shown below) allows you to manage your Themes.

    Theme Files

    WordPress themes all have a unique set of files, most of which are optional for it to work, but there are a couple of required files. The only absolutely essential files you need for your theme to function are index.php and style.css. Below is a chart of other theme files and what they do. (Provided by Digging into WordPress)

    What is a Theme Framework

    A Theme Framework is a powerful WordPress Theme designed to be a flexible foundation for quicker WordPress development, making theme customization more accessible through built in options. The Framework can be utilized out of the box as is, but ideally the framework serves as a robust parent theme for child themes.

    What is a Child Theme

    A child theme is an extension of a framework that is comprised of typical theme elements – including:

    • theme files: index.php is the essential theme file, beyond that they are all optional but provide more degrees of control for different areas of the site (see chart above);
    • stylesheet: styling info for your theme;
    • functions file: adds special behaviors to your theme;
    • images folder: works in conjunction with style sheet to style theme;
    • screenshot: in the appearance section of the WP backend the user will see this image, which should be a preview of what the theme will look like.

    These elements are grouped together in a child theme folder and can be activated like any other WordPress theme. (see An Intro to Child Themes)

    The Benefit of using Frameworks & Child Theme

    The benefit of using a child theme with a framework is that you can use the framework as a base for a custom template instead of starting from scratch. Any customizations to the theme you will want to make in your child theme. Child themes inherit all the functionality of the framework, but can also improve upon it.

    Theme Frameworks usually are equipped with functionality beyond that of a regular WP theme such as: SEO capabilities, wigitized areas, theme options that allow the end user to customize with ease without coding knowledge, and other advanced functionality that might otherwise need to be added through plugins or custom coding.

    For example, the Genesis Theme by StudioPress provides an area to change the layout without using a new template file. See screenshot below:

    Staying Up-To-Date

    Using a Theme Framework with a child theme allows you to stay up to date with the new versions of the theme as it adapts to the changing WordPress platform, without overwriting your custom changes.

    How to Customize a Child Theme

    Creating a child theme is easy and straightforward. The steps are as follows:

    1. Upload the theme framework and child theme into the themes folder (/wp-content/themes).
    2. Activate the child theme in the appearance section of the WP backend. The child theme will inherit all the functionality of the framework (widget areas, templates, theme options, etc.). If a specific template file is not found in the child theme (ie: page.php, single.php, 404.php), WP will look for the file in the Parent Theme and use the appropriate one.
    3. To customize template files in the child theme, copy a file over from the parent theme and make modifications to the file in the child theme directory. This way you have absolute control over your child theme without ever touching a single file inside your framework.

    Why is Genesis my favorite?

    Genesis Theme by StudioPress (this is NOT a sponsored link) is the framework I most commonly work with because of its excellent support and functionality.  It is a premium theme so the forums are very active and helpful and there are many tutorials on the site (see http://dev.studiopress.com/). The framework is updated regularly and I have yet to encounter conflicts with Genesis updates and WordPress software updates. There are also a number of plugins specifically made to extend the Genesis Framework further, but that is for another post…

    This has been an overview/introduction to theme frameworks and child themes.  Have you ever used the Genesis Framework before? Or do you have another theme framework that you prefer. I’d love to hear your thoughts.

    Comments

    1. Hi Tim… excellent post! I actually dropped what I was doing and read it as soon as it popped into my email. I have followed this advice last summer when building a new WP theme for insurance agents. I began with Hybrid, a well-known open source theme (framework) with a decent sized community using it. Then I used the author’s child theme, Skeleton, and customized from there. I’ve been quite happy, and you are correct, it’s the only way to fly. Using a trusted framework theme such as Genesis or Hybrid ensures that WP upgrades (and also plugin upgrades) don’t cause the walls to crumble when the upgrades occur.

      As always… your info is “spot on.” 🙂

      • Actually, Ken, our amazing WordPress guru, the lovely Miss Rachel Tietjen, wrote this post! Tim is hard at work on other posts…

        • Hi Alalisa! The talented Tim and I have been wasting valuable time (not too much though) just now in “social media” so tell him to get writing the “good stuff!” Just kidding of course. Let the team know that I do read everything you guys publish, and often am just to busy to thank and comment properly. 🙂

      • Ken, This post was written by our WordPress Guru Rachel. And I’m glad it’s hitting the right spot!

    2. Great resources here, Tim, and smart strategy to use child themes this way.

    Speak Your Mind

    *