Upload
wordcamp-sydney
View
798
Download
0
Embed Size (px)
DESCRIPTION
If you've been building WordPress websites for a while you may already be familiar with Child Themes. They are the recommended way of making modifications to an existing theme. Chris shows us the basics of Child Theming, including the why it is so recommended and how to actually make your first WordPress Child Theme.
Citation preview
Photo by Garreth Wicock - http://www.flickr.com/photos/gjmj/
Photo by Thomas Hawk - http://www.flickr.com/photos/thomashawk/
“child themes are the recommended way
of making modifications to a theme”
Source: http://codex.wordpress.org/Child_Themes
• Changing favicon
• Changing logo / banner
• Adding additional components (e.g. bbPress)
• Changing colour scheme
wp-content
themes
twentyeleven
wcsyd
wp-content
themes
twentyeleven
wcsyd
wcsyd-child
themes
twentyeleven
wcsyd
wcsyd-child
style.css
“style.css is the one and only required file in a
child theme. It replaces the style.css of the
parent.”
Source: http://codex.wordpress.org/Child_Themes
/*
Theme Name: WCSyd Child
Template: wcsyd
*/
“It replaces the style.css of the
parent.”
Source: http://codex.wordpress.org/Child_Themes
/*
Theme Name: WCSyd Child
Template: wcsyd
*/
@import url("../wcsyd/style.css");
wcsyd
wcsyd-child
single.php
single.php
wcsyd
wcsyd-child
archive.php
archive.php
The functions.php is loaded in addition to the parent’s
functions.php. (Specifically, it is loaded right
before the parent’s file.)
Source: http://codex.wordpress.org/Child_Themes
wcsyd-child
wcsyd
functions.php
functions.php
• do_action()
• apply_filters()
• get_template_part()
• function_exists()
• require_once()
• include_once()
• !important (css)
*May be suitable in
certain circumstance
• http://codex.wordpress.org/Child_Themes
• http://themeshaper.com/modify-wordpress-themes/
• http://themeshaper.com/2009/04/17/wordpress-child-theme-basics/