child theme
DESCRIPTION
This is the slide I used for WordPress Meetup Bangkok Aug 2014TRANSCRIPT
![Page 1: Child Theme](https://reader033.vdocument.in/reader033/viewer/2022052823/5558c58ed8b42a235c8b4784/html5/thumbnails/1.jpg)
Child ThemesWordPress Meetup Bangkok, 2014/08/17
Shinichi Nishikawa
![Page 2: Child Theme](https://reader033.vdocument.in/reader033/viewer/2022052823/5558c58ed8b42a235c8b4784/html5/thumbnails/2.jpg)
What is a Child Theme?
![Page 3: Child Theme](https://reader033.vdocument.in/reader033/viewer/2022052823/5558c58ed8b42a235c8b4784/html5/thumbnails/3.jpg)
CodexA 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.
![Page 4: Child Theme](https://reader033.vdocument.in/reader033/viewer/2022052823/5558c58ed8b42a235c8b4784/html5/thumbnails/4.jpg)
CodexA 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.
![Page 5: Child Theme](https://reader033.vdocument.in/reader033/viewer/2022052823/5558c58ed8b42a235c8b4784/html5/thumbnails/5.jpg)
CodexA 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.
![Page 7: Child Theme](https://reader033.vdocument.in/reader033/viewer/2022052823/5558c58ed8b42a235c8b4784/html5/thumbnails/7.jpg)
Parent Theme?
Any WordPress themes can be a Parent Theme.
Exception: You can’t make a Child Theme of another Child Themes.
![Page 8: Child Theme](https://reader033.vdocument.in/reader033/viewer/2022052823/5558c58ed8b42a235c8b4784/html5/thumbnails/8.jpg)
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.
![Page 9: Child Theme](https://reader033.vdocument.in/reader033/viewer/2022052823/5558c58ed8b42a235c8b4784/html5/thumbnails/9.jpg)
Demo 1
Parent Theme: Twenty Fourteen
Child Theme: Shin 2014
![Page 10: Child Theme](https://reader033.vdocument.in/reader033/viewer/2022052823/5558c58ed8b42a235c8b4784/html5/thumbnails/10.jpg)
Concept of Child Theme
Don’t reinvent the wheel.
Change only what you need.
Protect changes from theme updates.
![Page 11: Child Theme](https://reader033.vdocument.in/reader033/viewer/2022052823/5558c58ed8b42a235c8b4784/html5/thumbnails/11.jpg)
Override
You can override 3 things
1. css
2. template files
3. functions in functions.php
![Page 12: Child Theme](https://reader033.vdocument.in/reader033/viewer/2022052823/5558c58ed8b42a235c8b4784/html5/thumbnails/12.jpg)
1. Override css
a presentation by Brandon Dove. http://www.slideshare.net/brandondove/parentchild-themes-vs-theme-frameworks/5
![Page 13: Child Theme](https://reader033.vdocument.in/reader033/viewer/2022052823/5558c58ed8b42a235c8b4784/html5/thumbnails/13.jpg)
Demo 2
Parent Theme: Twenty Thirteen
Child Theme: nu2013
https://wordpress.org/themes/nu2013
Example: nskw-style.com
![Page 14: Child Theme](https://reader033.vdocument.in/reader033/viewer/2022052823/5558c58ed8b42a235c8b4784/html5/thumbnails/14.jpg)
2. Override template files
If Child Theme has a template file, WordPress uses that.
If not, WordPress uses a template file in Parent Theme.
![Page 15: Child Theme](https://reader033.vdocument.in/reader033/viewer/2022052823/5558c58ed8b42a235c8b4784/html5/thumbnails/15.jpg)
3. Override functions.php
2 ways.
1. add functions.→ example in nu2013
2. override functions.→ devdmbootstrap3
![Page 16: Child Theme](https://reader033.vdocument.in/reader033/viewer/2022052823/5558c58ed8b42a235c8b4784/html5/thumbnails/16.jpg)
Demo 3
Parent Theme: devdmbootstrap3
Child Theme: devdmbootstrap3-child
https://wordpress.org/themes/devdmbootstrap3
![Page 17: Child Theme](https://reader033.vdocument.in/reader033/viewer/2022052823/5558c58ed8b42a235c8b4784/html5/thumbnails/17.jpg)
Child Themes vs Theme Frameworks.
![Page 18: Child Theme](https://reader033.vdocument.in/reader033/viewer/2022052823/5558c58ed8b42a235c8b4784/html5/thumbnails/18.jpg)
Theme Framework Examples
Underscores: underscores.me
Roots: roots.io/starter-theme
![Page 19: Child Theme](https://reader033.vdocument.in/reader033/viewer/2022052823/5558c58ed8b42a235c8b4784/html5/thumbnails/19.jpg)
Which to choose?
![Page 20: Child Theme](https://reader033.vdocument.in/reader033/viewer/2022052823/5558c58ed8b42a235c8b4784/html5/thumbnails/20.jpg)
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 )
![Page 21: Child Theme](https://reader033.vdocument.in/reader033/viewer/2022052823/5558c58ed8b42a235c8b4784/html5/thumbnails/21.jpg)
Theme Framework?
When you create from scratch.
When you have your own design.
When you change a lot from the original theme.