What the heck is a child theme? “ A WordPress child theme is a theme that inherits the functionality of another theme, called the parent theme, and allows you to modify, or add to, the functionality of that parent theme.” - The WordPress Codex
What can I use a child theme for? Customize the parent site design Add in additional functionality Save a bunch of time
Why would I use a child theme? Update the parent theme without losing your customizations Did I mention the part about saving time?
Example of a child theme
Example of a child theme
Example of a child theme
Example of a child theme
Example of a child theme
Example of a child theme
What do I need to get started? Choose a parent theme (check out twentyten & twentyeleven) A new folder in /wp-content/themes/ A CSS file in your new theme
Keep in mind… Your child theme can contain as many or as few files as you want Files in your child theme folder override files in the parent theme folder Adding a functions.php will add-to rather than override functions.php from your parent theme
The CSS file * Template = folder name of the parent theme
Themes page For bonus points, add a screenshot.png file to your child theme folder. 300 x 225 pixels
Overriding style elements Parent Theme Child Theme
Overriding style elements
Overriding files Parent Theme Child Theme
Overriding files
Pluggable functions A function in a parent theme wrapped in function_exists() can be overridden by defining it in your child theme’s functions.php file
Overriding functions Parent Theme Child Theme
Theme Frameworks Genesis – studiopress.com Thematic – themeshaper.com Hybrid – themehybrid.com “ A Theme framework is a Theme designed to be a flexible foundation for quicker WordPress development, usually serving as a robust Parent Theme for Child Themes. ” - The WordPress Codex
Resources http://codex.wordpress.org/Theme_Development http://codex.wordpress.org/Child_Themes http://codex.wordpress.org/images/1/18/Template_Hierarchy.png http://codex.wordpress.org/Plugin_API http://aaron.jorb.in/thirtyten/
Questions?
 

Intro to WordPress Child Themes

  • 1.
  • 2.
    What the heckis a child theme? “ A WordPress child theme is a theme that inherits the functionality of another theme, called the parent theme, and allows you to modify, or add to, the functionality of that parent theme.” - The WordPress Codex
  • 3.
    What can Iuse a child theme for? Customize the parent site design Add in additional functionality Save a bunch of time
  • 4.
    Why would Iuse a child theme? Update the parent theme without losing your customizations Did I mention the part about saving time?
  • 5.
    Example of achild theme
  • 6.
    Example of achild theme
  • 7.
    Example of achild theme
  • 8.
    Example of achild theme
  • 9.
    Example of achild theme
  • 10.
    Example of achild theme
  • 11.
    What do Ineed to get started? Choose a parent theme (check out twentyten & twentyeleven) A new folder in /wp-content/themes/ A CSS file in your new theme
  • 12.
    Keep in mind…Your child theme can contain as many or as few files as you want Files in your child theme folder override files in the parent theme folder Adding a functions.php will add-to rather than override functions.php from your parent theme
  • 13.
    The CSS file* Template = folder name of the parent theme
  • 14.
    Themes page Forbonus points, add a screenshot.png file to your child theme folder. 300 x 225 pixels
  • 15.
    Overriding style elementsParent Theme Child Theme
  • 16.
  • 17.
    Overriding files ParentTheme Child Theme
  • 18.
  • 19.
    Pluggable functions Afunction in a parent theme wrapped in function_exists() can be overridden by defining it in your child theme’s functions.php file
  • 20.
    Overriding functions ParentTheme Child Theme
  • 21.
    Theme Frameworks Genesis– studiopress.com Thematic – themeshaper.com Hybrid – themehybrid.com “ A Theme framework is a Theme designed to be a flexible foundation for quicker WordPress development, usually serving as a robust Parent Theme for Child Themes. ” - The WordPress Codex
  • 22.
    Resources http://codex.wordpress.org/Theme_Development http://codex.wordpress.org/Child_Themeshttp://codex.wordpress.org/images/1/18/Template_Hierarchy.png http://codex.wordpress.org/Plugin_API http://aaron.jorb.in/thirtyten/
  • 23.
  • 24.