Meetup child-themes
Upcoming SlideShare
Loading in...5

Meetup child-themes



Presentation for Westchester/Hudson Valley WordPress Meetup - September 29, 2010

Presentation for Westchester/Hudson Valley WordPress Meetup - September 29, 2010



Total Views
Views on SlideShare
Embed Views



7 Embeds 1,438 1155 276 3 1 1 1 1



Upload Details

Uploaded via as OpenOffice

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
Post Comment
Edit your comment

Meetup child-themes Meetup child-themes Presentation Transcript

  • Child Themes Daisy Olsen
  • What is a Child Theme
    • Installed and activated like any other theme
    • Dependent on a parent theme for elements not found in the child theme
    • Only style.css is required
    • Can be used to re-skin a theme
    • Can add functionality
    • Can over-ride parts of the parent theme
  • Why Use a Child Theme
    • Future-proof your customizations
    • Rapid development
    • Build upon a consistent codebase
    • Understanding of PHP and WordPress themeing is helpful but not required for basic child themes
  • Child Theme Files
    • WordPress template hierarchy
    • style.css – Only Child theme file is used.
    • functions.php – Both parent and child files always run.
    • Other files – Child theme checked first then Parent theme. First file found runs. Specific -> General
  • Making a Child Theme
    • Get to Know your Parent Theme
    • Create style.css
    • Page Templates
    • Overriding Parent Theme Files
    • Demo site :
  • Required in style.css /* Theme Name: Twenty Ten Child Demo Description: A Child Theme for Twenty Ten for Demonstration. Theme URI: Author: Daisy Olsen Author URI: Template: twentyten Version: 1.0 */
  • style.css
    • Option #1 – import style.css from parent theme @import url('../twentyten/style.css');
    • Option #2 – Copy/Paste entire style.css from parent theme into child theme style.css
    • Option #3 – Build new style.css from scratch
  • Hooks
    • Twenty Ten has one hook built in for adding additional content. WordPress also includes some hooks that can be used.
    do_action( 'twentyten_credits' );
    • Think of a hook as an insertion point.
    add_action('twentyten_credits', 'my_credits'); function my_credits() { echo 'This is my credit line using a function'; }
  • Replace Theme Template Files
    • Our Demo Child theme replaces the footer.php file with a customized version which changes the default footer credits with customized ones.
    • If a template file exists in the child theme the parent theme file is ignored.
  • Template Parts
    • New to WordPress 3.0
    • Twenty Ten allows you to modify the loop by creating a new file in the child theme with a modified version of loop.php
    • We will modify the way the category archive displays with loop-category.php
  • Theme Frameworks
    • Built with the intention of being modified via child theme
    • Extensive Action/Filter Capabilities
    • Active Development
    • Popular Parent/Child Frameworks
      • Hybrid
      • Thematic
      • Genesis (Commercial) - StudioPress
      • Builder (Commercial) - iThemes
  • Resources
    • Codex: Child Themes
    • Aaron Jorbin's Guide
    • Understanding Child Themes
    • Modify WordPress Themes The Smart Way