Child Themes
WordPress Meetup Bangkok, 2014/08/17
Shinichi Nishikawa
What is a Child
Theme?
Codex
A child theme is a theme that inherits the
functionality of another theme, called the
parent theme.
!
Child themes allow you to modify, or add to the
functionality of that parent theme.
!
A child theme is the best, safest, and easiest
way to modify an existing theme.
Codex
A child theme is a theme that inherits the
functionality of another theme, called the
parent theme.
!
Child themes allow you to modify, or add to the
functionality of that parent theme.
!
A child theme is the best, safest, and easiest
way to modify an existing theme.
Codex
A child theme is a theme that inherits the
functionality of another theme, called the
parent theme.
!
Child themes allow you to modify, or add to the
functionality of that parent theme.
!
A child theme is the best, safest, and easiest
way to modify an existing theme.
Codex
Child Theme:

http://codex.wordpress.org/Child_Themes
Parent Theme?
Any WordPress themes can be a Parent
Theme.
Exception: You can’t make a Child Theme
of another Child Themes.
How to make a child theme
1. Create a folder in wp-content/themes
2. Put style.css with

“Template: ParentThemeDirName”

in Comment.
3. Add what you want.
Demo 1
Parent Theme: Twenty Fourteen
Child Theme: Shin 2014
Concept of Child Theme
Don’t reinvent the wheel.
Change only what you need.
Protect changes from theme updates.
Override
You can override 3 things
1. css
2. template files
3. functions in functions.php
1. Override css
a presentation by Brandon Dove.



http://www.slideshare.net/
brandondove/parentchild-themes-vs-
theme-frameworks/5
Demo 2
Parent Theme: Twenty Thirteen
Child Theme: nu2013
https://wordpress.org/themes/nu2013
Example: nskw-style.com
2. Override template files
If Child Theme has a template file,
WordPress uses that.
If not, WordPress uses a template file in
Parent Theme.
3. Override functions.php
2 ways.
1. add functions.

→ example in nu2013
2. override functions.

→ devdmbootstrap3
Demo 3
Parent Theme: devdmbootstrap3
Child Theme: devdmbootstrap3-child
https://wordpress.org/themes/
devdmbootstrap3
Child Themes vs
Theme Frameworks.
Theme Framework
Examples
Underscores: underscores.me
Roots: roots.io/starter-theme
Which to choose?
Child themes?
When you find a good parent theme.
And it’s almost what you want.
And you need to change a little bit.
( When the budget is very small )
Theme Framework?
When you create from scratch.
When you have your own design.
When you change a lot from the original
theme.

Child Theme

  • 1.
    Child Themes WordPress MeetupBangkok, 2014/08/17 Shinichi Nishikawa
  • 2.
    What is aChild Theme?
  • 3.
    Codex A child themeis a theme that inherits the functionality of another theme, called the parent theme. ! Child themes allow you to modify, or add to the functionality of that parent theme. ! A child theme is the best, safest, and easiest way to modify an existing theme.
  • 4.
    Codex A child themeis a theme that inherits the functionality of another theme, called the parent theme. ! Child themes allow you to modify, or add to the functionality of that parent theme. ! A child theme is the best, safest, and easiest way to modify an existing theme.
  • 5.
    Codex A child themeis a theme that inherits the functionality of another theme, called the parent theme. ! Child themes allow you to modify, or add to the functionality of that parent theme. ! A child theme is the best, safest, and easiest way to modify an existing theme.
  • 6.
  • 7.
    Parent Theme? Any WordPressthemes can be a Parent Theme. Exception: You can’t make a Child Theme of another Child Themes.
  • 8.
    How to makea child theme 1. Create a folder in wp-content/themes 2. Put style.css with
 “Template: ParentThemeDirName”
 in Comment. 3. Add what you want.
  • 9.
    Demo 1 Parent Theme:Twenty Fourteen Child Theme: Shin 2014
  • 10.
    Concept of ChildTheme Don’t reinvent the wheel. Change only what you need. Protect changes from theme updates.
  • 11.
    Override You can override3 things 1. css 2. template files 3. functions in functions.php
  • 12.
    1. Override css apresentation by Brandon Dove.
 
 http://www.slideshare.net/ brandondove/parentchild-themes-vs- theme-frameworks/5
  • 13.
    Demo 2 Parent Theme:Twenty Thirteen Child Theme: nu2013 https://wordpress.org/themes/nu2013 Example: nskw-style.com
  • 14.
    2. Override templatefiles If Child Theme has a template file, WordPress uses that. If not, WordPress uses a template file in Parent Theme.
  • 15.
    3. Override functions.php 2ways. 1. add functions.
 → example in nu2013 2. override functions.
 → devdmbootstrap3
  • 16.
    Demo 3 Parent Theme:devdmbootstrap3 Child Theme: devdmbootstrap3-child https://wordpress.org/themes/ devdmbootstrap3
  • 17.
  • 18.
  • 19.
  • 20.
    Child themes? When youfind a good parent theme. And it’s almost what you want. And you need to change a little bit. ( When the budget is very small )
  • 21.
    Theme Framework? When youcreate from scratch. When you have your own design. When you change a lot from the original theme.