Child Theming WordPress - Chris Aprea - WordCamp Sydney 2012
-
Upload
wordcamp-sydney -
Category
Technology
-
view
798 -
download
0
description
Transcript of Child Theming WordPress - Chris Aprea - WordCamp Sydney 2012
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/