Child Theming WordPress - Chris Aprea - WordCamp Sydney 2012

1,091 views

Published on

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.

Published in: Technology, Business
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,091
On SlideShare
0
From Embeds
0
Number of Embeds
28
Actions
Shares
0
Downloads
10
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Child Theming WordPress - Chris Aprea - WordCamp Sydney 2012

  1. 1. Photo by Garreth Wicock - http://www.flickr.com/photos/gjmj/
  2. 2. Photo by Thomas Hawk - http://www.flickr.com/photos/thomashawk/
  3. 3. “child themes are the recommended wayof making modifications to a theme” Source: http://codex.wordpress.org/Child_Themes
  4. 4. • Changing favicon• Changing logo / banner• Adding additional components (e.g. bbPress)• Changing colour scheme
  5. 5. wp-content themes twentyeleven wcsyd
  6. 6. wp-content themes twentyeleven wcsyd wcsyd-child
  7. 7. themes twentyeleven wcsyd wcsyd-child style.css
  8. 8. “style.css is the one and only required file in achild theme. It replaces the style.css of the parent.” Source: http://codex.wordpress.org/Child_Themes
  9. 9. /*Theme Name: WCSyd ChildTemplate: wcsyd*/
  10. 10. “It replaces thestyle.css of the parent.”Source: http://codex.wordpress.org/Child_Themes
  11. 11. /*Theme Name: WCSyd ChildTemplate: wcsyd*/@import url("../wcsyd/style.css");
  12. 12. wcsyd single.phpwcsyd-child single.php
  13. 13. wcsyd archive.phpwcsyd-child archive.php
  14. 14. 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
  15. 15. wcsyd-child functions.phpwcsyd functions.php
  16. 16. • do_action()• apply_filters()• get_template_part()• function_exists()
  17. 17. • require_once()• include_once()• !important (css)*May be suitable incertain circumstance
  18. 18. • http://codex.wordpress.org/Child_ Themes• http://themeshaper.com/modify- wordpress-themes/• http://themeshaper.com/2009/04/ 17/wordpress-child-theme-basics/

×