SlideShare a Scribd company logo
Introduction to
WordPress Child
Theming
Introduction to WordPress Child Theming
Topher DeRosia
@topher1kenobe
Hi, my name is Topher
I’m a WordPress developer from
Grand Rapids MI
@topher1kenobe
Introduction to WordPress Child Theming
Topher DeRosia
@topher1kenobe
What is a child theme?
Introduction to WordPress Child Theming
Topher DeRosia
@topher1kenobe
● At its very minimum, a child theme has a
style.css file that names a parent theme.
● A child theme inherits all of the attributes of
its parent; styles, functions, virus code, etc.
Why use a child theme?
Introduction to WordPress Child Theming
Topher DeRosia
@topher1kenobe
● So that when you update the parent you
don't lose your custom styles and
templates.
● So that when you're starting your new
theme you can start with an existing
powerful system.
Making a child theme
Introduction to WordPress Child Theming
Topher DeRosia
@topher1kenobe
Step 1: create the theme and style.css
Using Make as the parent theme, copy the entire CSS comment block
from the parent style.css
/**
* Theme Name: Child of Make
* Theme URI: https://thethemefoundry.com/wordpress-themes/make/
* Author: The Theme Foundry & Topher
* Author URI: https://thethemefoundry.com
* Description: A Starter child theme of Make
* Version: 1.0
* License: GNU General Public License v2 or later
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
* Text Domain: make
* Domain Path: /languages/
* Tags: black, <snip>
* Make WordPress Theme, Copyright 2014 The Theme Foundry
* Make is distributed under the terms of the GNU GPL
*/
Making a child theme
Introduction to WordPress Child Theming
Topher DeRosia
@topher1kenobe
Step 2: add one item to the comment block
* Template: make
In this example, “make” is the slug of the parent theme.
Making a child theme
Introduction to WordPress Child Theming
Topher DeRosia
@topher1kenobe
Step 3: include the parent CSS
Child theme functions.php:
<?php
function get_parent_theme_css() {
wp_enqueue_style( 'make-theme', get_template_directory_uri() . '/style.css' );
}
add_action( 'wp_enqueue_scripts', 'get_parent_theme_css' );
Making a child theme
Introduction to WordPress Child Theming
Topher DeRosia
@topher1kenobe
Step 4: Optional Screenshot
The screenshot that appears on the Themes page
comes from screenshot.png in the theme’s folder.
Changing Styles
Introduction to WordPress Child Theming
Topher DeRosia
@topher1kenobe
● Any styles placed in the child’s style.css file
will override the parent styles.
● !important styles in parent themes are
annoying and bad.
Template files
Introduction to WordPress Child Theming
Topher DeRosia
@topher1kenobe
● All theme files come from the parent theme,
UNLESS they are copied to the child theme.
● Once they’re copied to the child theme they
override the version in the parent theme.
● You may copy as many templates as you
wish.
Gotchas
Introduction to WordPress Child Theming
Topher DeRosia
@topher1kenobe
● The more templates you copy to child, the
fewer are getting updated.
● You can’t make grandchildren
● If the parent has a problem, ALL the children
have the same problem
THANKS FOR
LISTENING
Introduction to WordPress Child Theming
Topher DeRosia
@topher1kenobe
http://topher1kenobe.com
Follow me @topher1kenobe

More Related Content

What's hot

Reno-Tahoe WordCamp 2011 - WordPress End User Security - Dre Armeda
Reno-Tahoe WordCamp 2011 - WordPress End User Security - Dre ArmedaReno-Tahoe WordCamp 2011 - WordPress End User Security - Dre Armeda
Reno-Tahoe WordCamp 2011 - WordPress End User Security - Dre Armeda
Dre Armeda
 
Week 11 - Hosting and Migration
Week 11 - Hosting and MigrationWeek 11 - Hosting and Migration
Week 11 - Hosting and Migrationhenri_makembe
 
Introduction to WordPress Plugin Development, WordCamp North Canton, 2015
Introduction to WordPress Plugin Development, WordCamp North Canton, 2015Introduction to WordPress Plugin Development, WordCamp North Canton, 2015
Introduction to WordPress Plugin Development, WordCamp North Canton, 2015
topher1kenobe
 
Week 7 introduction to theme development
Week 7   introduction to theme developmentWeek 7   introduction to theme development
Week 7 introduction to theme developmenthenri_makembe
 
Elastic: Why WYSIWYG is the future of WordPress themes — WordCamp NYC 2009
Elastic: Why WYSIWYG is the future of WordPress themes — WordCamp NYC 2009Elastic: Why WYSIWYG is the future of WordPress themes — WordCamp NYC 2009
Elastic: Why WYSIWYG is the future of WordPress themes — WordCamp NYC 2009
Daryl Koopersmith
 
Intro to WordPress Plugin Development
Intro to WordPress Plugin DevelopmentIntro to WordPress Plugin Development
Intro to WordPress Plugin Development
Brad Williams
 
Step by step guide for creating wordpress plugin
Step by step guide for creating wordpress pluginStep by step guide for creating wordpress plugin
Step by step guide for creating wordpress pluginMainak Goswami
 
Building the basics (WordPress Ottawa 2014)
Building the basics (WordPress Ottawa 2014)Building the basics (WordPress Ottawa 2014)
Building the basics (WordPress Ottawa 2014)
Christopher Ross
 
Meetup child-themes
Meetup child-themesMeetup child-themes
Meetup child-themesDaisyOlsen
 
Don't Fear the Custom Theme: How to build a custom WordPress theme with only ...
Don't Fear the Custom Theme: How to build a custom WordPress theme with only ...Don't Fear the Custom Theme: How to build a custom WordPress theme with only ...
Don't Fear the Custom Theme: How to build a custom WordPress theme with only ...
LinnAlexandra
 
The Future Of WordPress Presentation
The Future Of WordPress PresentationThe Future Of WordPress Presentation
The Future Of WordPress Presentation
Dougal Campbell
 
Plugins at WordCamp Phoenix
Plugins at WordCamp PhoenixPlugins at WordCamp Phoenix
Plugins at WordCamp PhoenixAndrew Ryno
 
WordPress Standardized Loop API
WordPress Standardized Loop APIWordPress Standardized Loop API
WordPress Standardized Loop API
Chris Jean
 
Wordpress Plugin Development Short Tutorial
Wordpress Plugin Development Short TutorialWordpress Plugin Development Short Tutorial
Wordpress Plugin Development Short Tutorial
Christos Zigkolis
 
WordPress Theme Development for Designers
WordPress Theme Development for DesignersWordPress Theme Development for Designers
WordPress Theme Development for Designers
elliotjaystocks
 
WordPress Plugin Development For Beginners
WordPress Plugin Development For BeginnersWordPress Plugin Development For Beginners
WordPress Plugin Development For Beginners
johnpbloch
 
WordPress plugin development
WordPress plugin developmentWordPress plugin development
WordPress plugin development
Luc De Brouwer
 
DrupalEasy: Intro to Theme Development
DrupalEasy: Intro to Theme DevelopmentDrupalEasy: Intro to Theme Development
DrupalEasy: Intro to Theme Development
ultimike
 
Secure All The Things!
Secure All The Things!Secure All The Things!
Secure All The Things!
Dougal Campbell
 
PHPをさわらず作る!デザイナーさんのためのWordPress【超!初級】
PHPをさわらず作る!デザイナーさんのためのWordPress【超!初級】PHPをさわらず作る!デザイナーさんのためのWordPress【超!初級】
PHPをさわらず作る!デザイナーさんのためのWordPress【超!初級】
Mami Kuroki
 

What's hot (20)

Reno-Tahoe WordCamp 2011 - WordPress End User Security - Dre Armeda
Reno-Tahoe WordCamp 2011 - WordPress End User Security - Dre ArmedaReno-Tahoe WordCamp 2011 - WordPress End User Security - Dre Armeda
Reno-Tahoe WordCamp 2011 - WordPress End User Security - Dre Armeda
 
Week 11 - Hosting and Migration
Week 11 - Hosting and MigrationWeek 11 - Hosting and Migration
Week 11 - Hosting and Migration
 
Introduction to WordPress Plugin Development, WordCamp North Canton, 2015
Introduction to WordPress Plugin Development, WordCamp North Canton, 2015Introduction to WordPress Plugin Development, WordCamp North Canton, 2015
Introduction to WordPress Plugin Development, WordCamp North Canton, 2015
 
Week 7 introduction to theme development
Week 7   introduction to theme developmentWeek 7   introduction to theme development
Week 7 introduction to theme development
 
Elastic: Why WYSIWYG is the future of WordPress themes — WordCamp NYC 2009
Elastic: Why WYSIWYG is the future of WordPress themes — WordCamp NYC 2009Elastic: Why WYSIWYG is the future of WordPress themes — WordCamp NYC 2009
Elastic: Why WYSIWYG is the future of WordPress themes — WordCamp NYC 2009
 
Intro to WordPress Plugin Development
Intro to WordPress Plugin DevelopmentIntro to WordPress Plugin Development
Intro to WordPress Plugin Development
 
Step by step guide for creating wordpress plugin
Step by step guide for creating wordpress pluginStep by step guide for creating wordpress plugin
Step by step guide for creating wordpress plugin
 
Building the basics (WordPress Ottawa 2014)
Building the basics (WordPress Ottawa 2014)Building the basics (WordPress Ottawa 2014)
Building the basics (WordPress Ottawa 2014)
 
Meetup child-themes
Meetup child-themesMeetup child-themes
Meetup child-themes
 
Don't Fear the Custom Theme: How to build a custom WordPress theme with only ...
Don't Fear the Custom Theme: How to build a custom WordPress theme with only ...Don't Fear the Custom Theme: How to build a custom WordPress theme with only ...
Don't Fear the Custom Theme: How to build a custom WordPress theme with only ...
 
The Future Of WordPress Presentation
The Future Of WordPress PresentationThe Future Of WordPress Presentation
The Future Of WordPress Presentation
 
Plugins at WordCamp Phoenix
Plugins at WordCamp PhoenixPlugins at WordCamp Phoenix
Plugins at WordCamp Phoenix
 
WordPress Standardized Loop API
WordPress Standardized Loop APIWordPress Standardized Loop API
WordPress Standardized Loop API
 
Wordpress Plugin Development Short Tutorial
Wordpress Plugin Development Short TutorialWordpress Plugin Development Short Tutorial
Wordpress Plugin Development Short Tutorial
 
WordPress Theme Development for Designers
WordPress Theme Development for DesignersWordPress Theme Development for Designers
WordPress Theme Development for Designers
 
WordPress Plugin Development For Beginners
WordPress Plugin Development For BeginnersWordPress Plugin Development For Beginners
WordPress Plugin Development For Beginners
 
WordPress plugin development
WordPress plugin developmentWordPress plugin development
WordPress plugin development
 
DrupalEasy: Intro to Theme Development
DrupalEasy: Intro to Theme DevelopmentDrupalEasy: Intro to Theme Development
DrupalEasy: Intro to Theme Development
 
Secure All The Things!
Secure All The Things!Secure All The Things!
Secure All The Things!
 
PHPをさわらず作る!デザイナーさんのためのWordPress【超!初級】
PHPをさわらず作る!デザイナーさんのためのWordPress【超!初級】PHPをさわらず作る!デザイナーさんのためのWordPress【超!初級】
PHPをさわらず作る!デザイナーさんのためのWordPress【超!初級】
 

Similar to Introduction to WordPress Child Theming, WordCamp Kansas City, 2015

Meetup child-themes
Meetup child-themesMeetup child-themes
Meetup child-themesDaisyOlsen
 
Meetup child-themes
Meetup child-themesMeetup child-themes
Meetup child-themes
DaisyOlsen
 
Child Theme
Child ThemeChild Theme
Child Theme
Shinichi Nishikawa
 
WP Joburg Meetup 10: Genesis Framework by Trish Cornelius
WP Joburg Meetup 10: Genesis Framework by Trish CorneliusWP Joburg Meetup 10: Genesis Framework by Trish Cornelius
WP Joburg Meetup 10: Genesis Framework by Trish Cornelius
WPJoburg
 
Responsive Theme Workshop - WordCamp Columbus 2015
Responsive Theme Workshop - WordCamp Columbus 2015Responsive Theme Workshop - WordCamp Columbus 2015
Responsive Theme Workshop - WordCamp Columbus 2015
Joe Querin
 
Rockford WordPress Meetup - Child Themes
Rockford WordPress Meetup - Child ThemesRockford WordPress Meetup - Child Themes
Rockford WordPress Meetup - Child Themes
Andrew Wikel
 
Why you should be using WordPress child themes
Why you should be using WordPress child themesWhy you should be using WordPress child themes
Why you should be using WordPress child themes
Anthony Hortin
 
What are child themes, and why use them
What are child themes, and why use themWhat are child themes, and why use them
What are child themes, and why use them
Utsav Singh Rathour
 
The Why, When, How of WordPress Child Themes
The Why, When, How of WordPress Child ThemesThe Why, When, How of WordPress Child Themes
The Why, When, How of WordPress Child Themes
Anthony Hortin
 
Child themes
Child themesChild themes
Child themesbobwlsn
 
Intro to WordPress Child Themes (NERDS Sept 2014)
Intro to WordPress Child Themes (NERDS Sept 2014)Intro to WordPress Child Themes (NERDS Sept 2014)
Intro to WordPress Child Themes (NERDS Sept 2014)
Kelly Dwan
 
Firstborn child theme word camp presentation - atlanta 2013
Firstborn child theme   word camp presentation - atlanta 2013Firstborn child theme   word camp presentation - atlanta 2013
Firstborn child theme word camp presentation - atlanta 2013
Evan Mullins
 
Theme frameworks & child themes
Theme frameworks & child themesTheme frameworks & child themes
Theme frameworks & child themesChris Olbekson
 
WordPress Child Themes
WordPress Child ThemesWordPress Child Themes
WordPress Child Themesrfair404
 
2009-08-28-WordPress-Parent-Child-Themes
2009-08-28-WordPress-Parent-Child-Themes2009-08-28-WordPress-Parent-Child-Themes
2009-08-28-WordPress-Parent-Child-ThemesLightSpeed
 
WordPress Child Themes: The what. The why. The how.
WordPress Child Themes: The what. The why. The how.WordPress Child Themes: The what. The why. The how.
WordPress Child Themes: The what. The why. The how.
Janelle Reichman
 
WordPress Theme Workshop: Part 4
WordPress Theme Workshop: Part 4WordPress Theme Workshop: Part 4
WordPress Theme Workshop: Part 4
David Bisset
 
Parent and child themes
Parent and child themesParent and child themes
Parent and child themes
Tom Jenkins
 
Responsive themeworkshop wcneo2016
Responsive themeworkshop wcneo2016Responsive themeworkshop wcneo2016
Responsive themeworkshop wcneo2016
David Brattoli
 
WordPress Child Themes
WordPress Child ThemesWordPress Child Themes
WordPress Child Themesopenchamp
 

Similar to Introduction to WordPress Child Theming, WordCamp Kansas City, 2015 (20)

Meetup child-themes
Meetup child-themesMeetup child-themes
Meetup child-themes
 
Meetup child-themes
Meetup child-themesMeetup child-themes
Meetup child-themes
 
Child Theme
Child ThemeChild Theme
Child Theme
 
WP Joburg Meetup 10: Genesis Framework by Trish Cornelius
WP Joburg Meetup 10: Genesis Framework by Trish CorneliusWP Joburg Meetup 10: Genesis Framework by Trish Cornelius
WP Joburg Meetup 10: Genesis Framework by Trish Cornelius
 
Responsive Theme Workshop - WordCamp Columbus 2015
Responsive Theme Workshop - WordCamp Columbus 2015Responsive Theme Workshop - WordCamp Columbus 2015
Responsive Theme Workshop - WordCamp Columbus 2015
 
Rockford WordPress Meetup - Child Themes
Rockford WordPress Meetup - Child ThemesRockford WordPress Meetup - Child Themes
Rockford WordPress Meetup - Child Themes
 
Why you should be using WordPress child themes
Why you should be using WordPress child themesWhy you should be using WordPress child themes
Why you should be using WordPress child themes
 
What are child themes, and why use them
What are child themes, and why use themWhat are child themes, and why use them
What are child themes, and why use them
 
The Why, When, How of WordPress Child Themes
The Why, When, How of WordPress Child ThemesThe Why, When, How of WordPress Child Themes
The Why, When, How of WordPress Child Themes
 
Child themes
Child themesChild themes
Child themes
 
Intro to WordPress Child Themes (NERDS Sept 2014)
Intro to WordPress Child Themes (NERDS Sept 2014)Intro to WordPress Child Themes (NERDS Sept 2014)
Intro to WordPress Child Themes (NERDS Sept 2014)
 
Firstborn child theme word camp presentation - atlanta 2013
Firstborn child theme   word camp presentation - atlanta 2013Firstborn child theme   word camp presentation - atlanta 2013
Firstborn child theme word camp presentation - atlanta 2013
 
Theme frameworks & child themes
Theme frameworks & child themesTheme frameworks & child themes
Theme frameworks & child themes
 
WordPress Child Themes
WordPress Child ThemesWordPress Child Themes
WordPress Child Themes
 
2009-08-28-WordPress-Parent-Child-Themes
2009-08-28-WordPress-Parent-Child-Themes2009-08-28-WordPress-Parent-Child-Themes
2009-08-28-WordPress-Parent-Child-Themes
 
WordPress Child Themes: The what. The why. The how.
WordPress Child Themes: The what. The why. The how.WordPress Child Themes: The what. The why. The how.
WordPress Child Themes: The what. The why. The how.
 
WordPress Theme Workshop: Part 4
WordPress Theme Workshop: Part 4WordPress Theme Workshop: Part 4
WordPress Theme Workshop: Part 4
 
Parent and child themes
Parent and child themesParent and child themes
Parent and child themes
 
Responsive themeworkshop wcneo2016
Responsive themeworkshop wcneo2016Responsive themeworkshop wcneo2016
Responsive themeworkshop wcneo2016
 
WordPress Child Themes
WordPress Child ThemesWordPress Child Themes
WordPress Child Themes
 

More from topher1kenobe

How To Increase Ecommerce Conversions
How To Increase Ecommerce ConversionsHow To Increase Ecommerce Conversions
How To Increase Ecommerce Conversions
topher1kenobe
 
Build Ecommerce Sites With Confidence (Demystifying Ecommerce), WordCamp Los ...
Build Ecommerce Sites With Confidence (Demystifying Ecommerce), WordCamp Los ...Build Ecommerce Sites With Confidence (Demystifying Ecommerce), WordCamp Los ...
Build Ecommerce Sites With Confidence (Demystifying Ecommerce), WordCamp Los ...
topher1kenobe
 
Build Ecommerce Sites With Confidence (Demystifying Ecommerce)
Build Ecommerce Sites With Confidence (Demystifying Ecommerce)Build Ecommerce Sites With Confidence (Demystifying Ecommerce)
Build Ecommerce Sites With Confidence (Demystifying Ecommerce)
topher1kenobe
 
6 Ecommerce Trends Altering the Ecommerce Landscape, and changing which strat...
6 Ecommerce Trends Altering the Ecommerce Landscape, and changing which strat...6 Ecommerce Trends Altering the Ecommerce Landscape, and changing which strat...
6 Ecommerce Trends Altering the Ecommerce Landscape, and changing which strat...
topher1kenobe
 
Introduction to the WordPress Transients API
Introduction to the WordPress Transients APIIntroduction to the WordPress Transients API
Introduction to the WordPress Transients API
topher1kenobe
 
Talking to Other Sites with the WP HTTP API
Talking to Other Sites with the WP HTTP APITalking to Other Sites with the WP HTTP API
Talking to Other Sites with the WP HTTP API
topher1kenobe
 
What’s a REST API and why should I care?
What’s a REST API and why should I care?What’s a REST API and why should I care?
What’s a REST API and why should I care?
topher1kenobe
 
Working with WP_Query in WordPress
Working with WP_Query in WordPressWorking with WP_Query in WordPress
Working with WP_Query in WordPress
topher1kenobe
 
HeroPress: A Case Study
HeroPress: A Case StudyHeroPress: A Case Study
HeroPress: A Case Study
topher1kenobe
 
Custom Database Queries in WordPress
Custom Database Queries in WordPressCustom Database Queries in WordPress
Custom Database Queries in WordPress
topher1kenobe
 
Intro to Plugin Development, Miami WordCamp, 2015
Intro to Plugin Development, Miami WordCamp, 2015Intro to Plugin Development, Miami WordCamp, 2015
Intro to Plugin Development, Miami WordCamp, 2015
topher1kenobe
 
WordCamp Ann Arbor 2014: Site Caching, From Nothing to Everything
WordCamp Ann Arbor 2014: Site Caching, From Nothing to EverythingWordCamp Ann Arbor 2014: Site Caching, From Nothing to Everything
WordCamp Ann Arbor 2014: Site Caching, From Nothing to Everything
topher1kenobe
 
Command Line Awesome, WordCamp Grand Rapids 2014
Command Line Awesome, WordCamp Grand Rapids 2014Command Line Awesome, WordCamp Grand Rapids 2014
Command Line Awesome, WordCamp Grand Rapids 2014
topher1kenobe
 

More from topher1kenobe (13)

How To Increase Ecommerce Conversions
How To Increase Ecommerce ConversionsHow To Increase Ecommerce Conversions
How To Increase Ecommerce Conversions
 
Build Ecommerce Sites With Confidence (Demystifying Ecommerce), WordCamp Los ...
Build Ecommerce Sites With Confidence (Demystifying Ecommerce), WordCamp Los ...Build Ecommerce Sites With Confidence (Demystifying Ecommerce), WordCamp Los ...
Build Ecommerce Sites With Confidence (Demystifying Ecommerce), WordCamp Los ...
 
Build Ecommerce Sites With Confidence (Demystifying Ecommerce)
Build Ecommerce Sites With Confidence (Demystifying Ecommerce)Build Ecommerce Sites With Confidence (Demystifying Ecommerce)
Build Ecommerce Sites With Confidence (Demystifying Ecommerce)
 
6 Ecommerce Trends Altering the Ecommerce Landscape, and changing which strat...
6 Ecommerce Trends Altering the Ecommerce Landscape, and changing which strat...6 Ecommerce Trends Altering the Ecommerce Landscape, and changing which strat...
6 Ecommerce Trends Altering the Ecommerce Landscape, and changing which strat...
 
Introduction to the WordPress Transients API
Introduction to the WordPress Transients APIIntroduction to the WordPress Transients API
Introduction to the WordPress Transients API
 
Talking to Other Sites with the WP HTTP API
Talking to Other Sites with the WP HTTP APITalking to Other Sites with the WP HTTP API
Talking to Other Sites with the WP HTTP API
 
What’s a REST API and why should I care?
What’s a REST API and why should I care?What’s a REST API and why should I care?
What’s a REST API and why should I care?
 
Working with WP_Query in WordPress
Working with WP_Query in WordPressWorking with WP_Query in WordPress
Working with WP_Query in WordPress
 
HeroPress: A Case Study
HeroPress: A Case StudyHeroPress: A Case Study
HeroPress: A Case Study
 
Custom Database Queries in WordPress
Custom Database Queries in WordPressCustom Database Queries in WordPress
Custom Database Queries in WordPress
 
Intro to Plugin Development, Miami WordCamp, 2015
Intro to Plugin Development, Miami WordCamp, 2015Intro to Plugin Development, Miami WordCamp, 2015
Intro to Plugin Development, Miami WordCamp, 2015
 
WordCamp Ann Arbor 2014: Site Caching, From Nothing to Everything
WordCamp Ann Arbor 2014: Site Caching, From Nothing to EverythingWordCamp Ann Arbor 2014: Site Caching, From Nothing to Everything
WordCamp Ann Arbor 2014: Site Caching, From Nothing to Everything
 
Command Line Awesome, WordCamp Grand Rapids 2014
Command Line Awesome, WordCamp Grand Rapids 2014Command Line Awesome, WordCamp Grand Rapids 2014
Command Line Awesome, WordCamp Grand Rapids 2014
 

Recently uploaded

The+Prospects+of+E-Commerce+in+China.pptx
The+Prospects+of+E-Commerce+in+China.pptxThe+Prospects+of+E-Commerce+in+China.pptx
The+Prospects+of+E-Commerce+in+China.pptx
laozhuseo02
 
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
3ipehhoa
 
test test test test testtest test testtest test testtest test testtest test ...
test test  test test testtest test testtest test testtest test testtest test ...test test  test test testtest test testtest test testtest test testtest test ...
test test test test testtest test testtest test testtest test testtest test ...
Arif0071
 
ER(Entity Relationship) Diagram for online shopping - TAE
ER(Entity Relationship) Diagram for online shopping - TAEER(Entity Relationship) Diagram for online shopping - TAE
ER(Entity Relationship) Diagram for online shopping - TAE
Himani415946
 
History+of+E-commerce+Development+in+China-www.cfye-commerce.shop
History+of+E-commerce+Development+in+China-www.cfye-commerce.shopHistory+of+E-commerce+Development+in+China-www.cfye-commerce.shop
History+of+E-commerce+Development+in+China-www.cfye-commerce.shop
laozhuseo02
 
BASIC C++ lecture NOTE C++ lecture 3.pptx
BASIC C++ lecture NOTE C++ lecture 3.pptxBASIC C++ lecture NOTE C++ lecture 3.pptx
BASIC C++ lecture NOTE C++ lecture 3.pptx
natyesu
 
1.Wireless Communication System_Wireless communication is a broad term that i...
1.Wireless Communication System_Wireless communication is a broad term that i...1.Wireless Communication System_Wireless communication is a broad term that i...
1.Wireless Communication System_Wireless communication is a broad term that i...
JeyaPerumal1
 
Latest trends in computer networking.pptx
Latest trends in computer networking.pptxLatest trends in computer networking.pptx
Latest trends in computer networking.pptx
JungkooksNonexistent
 
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
3ipehhoa
 
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
3ipehhoa
 
Living-in-IT-era-Module-7-Imaging-and-Design-for-Social-Impact.pptx
Living-in-IT-era-Module-7-Imaging-and-Design-for-Social-Impact.pptxLiving-in-IT-era-Module-7-Imaging-and-Design-for-Social-Impact.pptx
Living-in-IT-era-Module-7-Imaging-and-Design-for-Social-Impact.pptx
TristanJasperRamos
 
How to Use Contact Form 7 Like a Pro.pptx
How to Use Contact Form 7 Like a Pro.pptxHow to Use Contact Form 7 Like a Pro.pptx
How to Use Contact Form 7 Like a Pro.pptx
Gal Baras
 
Multi-cluster Kubernetes Networking- Patterns, Projects and Guidelines
Multi-cluster Kubernetes Networking- Patterns, Projects and GuidelinesMulti-cluster Kubernetes Networking- Patterns, Projects and Guidelines
Multi-cluster Kubernetes Networking- Patterns, Projects and Guidelines
Sanjeev Rampal
 
Output determination SAP S4 HANA SAP SD CC
Output determination SAP S4 HANA SAP SD CCOutput determination SAP S4 HANA SAP SD CC
Output determination SAP S4 HANA SAP SD CC
ShahulHameed54211
 
guildmasters guide to ravnica Dungeons & Dragons 5...
guildmasters guide to ravnica Dungeons & Dragons 5...guildmasters guide to ravnica Dungeons & Dragons 5...
guildmasters guide to ravnica Dungeons & Dragons 5...
Rogerio Filho
 
This 7-second Brain Wave Ritual Attracts Money To You.!
This 7-second Brain Wave Ritual Attracts Money To You.!This 7-second Brain Wave Ritual Attracts Money To You.!
This 7-second Brain Wave Ritual Attracts Money To You.!
nirahealhty
 

Recently uploaded (16)

The+Prospects+of+E-Commerce+in+China.pptx
The+Prospects+of+E-Commerce+in+China.pptxThe+Prospects+of+E-Commerce+in+China.pptx
The+Prospects+of+E-Commerce+in+China.pptx
 
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
 
test test test test testtest test testtest test testtest test testtest test ...
test test  test test testtest test testtest test testtest test testtest test ...test test  test test testtest test testtest test testtest test testtest test ...
test test test test testtest test testtest test testtest test testtest test ...
 
ER(Entity Relationship) Diagram for online shopping - TAE
ER(Entity Relationship) Diagram for online shopping - TAEER(Entity Relationship) Diagram for online shopping - TAE
ER(Entity Relationship) Diagram for online shopping - TAE
 
History+of+E-commerce+Development+in+China-www.cfye-commerce.shop
History+of+E-commerce+Development+in+China-www.cfye-commerce.shopHistory+of+E-commerce+Development+in+China-www.cfye-commerce.shop
History+of+E-commerce+Development+in+China-www.cfye-commerce.shop
 
BASIC C++ lecture NOTE C++ lecture 3.pptx
BASIC C++ lecture NOTE C++ lecture 3.pptxBASIC C++ lecture NOTE C++ lecture 3.pptx
BASIC C++ lecture NOTE C++ lecture 3.pptx
 
1.Wireless Communication System_Wireless communication is a broad term that i...
1.Wireless Communication System_Wireless communication is a broad term that i...1.Wireless Communication System_Wireless communication is a broad term that i...
1.Wireless Communication System_Wireless communication is a broad term that i...
 
Latest trends in computer networking.pptx
Latest trends in computer networking.pptxLatest trends in computer networking.pptx
Latest trends in computer networking.pptx
 
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
 
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
 
Living-in-IT-era-Module-7-Imaging-and-Design-for-Social-Impact.pptx
Living-in-IT-era-Module-7-Imaging-and-Design-for-Social-Impact.pptxLiving-in-IT-era-Module-7-Imaging-and-Design-for-Social-Impact.pptx
Living-in-IT-era-Module-7-Imaging-and-Design-for-Social-Impact.pptx
 
How to Use Contact Form 7 Like a Pro.pptx
How to Use Contact Form 7 Like a Pro.pptxHow to Use Contact Form 7 Like a Pro.pptx
How to Use Contact Form 7 Like a Pro.pptx
 
Multi-cluster Kubernetes Networking- Patterns, Projects and Guidelines
Multi-cluster Kubernetes Networking- Patterns, Projects and GuidelinesMulti-cluster Kubernetes Networking- Patterns, Projects and Guidelines
Multi-cluster Kubernetes Networking- Patterns, Projects and Guidelines
 
Output determination SAP S4 HANA SAP SD CC
Output determination SAP S4 HANA SAP SD CCOutput determination SAP S4 HANA SAP SD CC
Output determination SAP S4 HANA SAP SD CC
 
guildmasters guide to ravnica Dungeons & Dragons 5...
guildmasters guide to ravnica Dungeons & Dragons 5...guildmasters guide to ravnica Dungeons & Dragons 5...
guildmasters guide to ravnica Dungeons & Dragons 5...
 
This 7-second Brain Wave Ritual Attracts Money To You.!
This 7-second Brain Wave Ritual Attracts Money To You.!This 7-second Brain Wave Ritual Attracts Money To You.!
This 7-second Brain Wave Ritual Attracts Money To You.!
 

Introduction to WordPress Child Theming, WordCamp Kansas City, 2015

  • 1. Introduction to WordPress Child Theming Introduction to WordPress Child Theming Topher DeRosia @topher1kenobe
  • 2. Hi, my name is Topher I’m a WordPress developer from Grand Rapids MI @topher1kenobe Introduction to WordPress Child Theming Topher DeRosia @topher1kenobe
  • 3. What is a child theme? Introduction to WordPress Child Theming Topher DeRosia @topher1kenobe ● At its very minimum, a child theme has a style.css file that names a parent theme. ● A child theme inherits all of the attributes of its parent; styles, functions, virus code, etc.
  • 4. Why use a child theme? Introduction to WordPress Child Theming Topher DeRosia @topher1kenobe ● So that when you update the parent you don't lose your custom styles and templates. ● So that when you're starting your new theme you can start with an existing powerful system.
  • 5. Making a child theme Introduction to WordPress Child Theming Topher DeRosia @topher1kenobe Step 1: create the theme and style.css Using Make as the parent theme, copy the entire CSS comment block from the parent style.css /** * Theme Name: Child of Make * Theme URI: https://thethemefoundry.com/wordpress-themes/make/ * Author: The Theme Foundry & Topher * Author URI: https://thethemefoundry.com * Description: A Starter child theme of Make * Version: 1.0 * License: GNU General Public License v2 or later * License URI: http://www.gnu.org/licenses/gpl-2.0.html * Text Domain: make * Domain Path: /languages/ * Tags: black, <snip> * Make WordPress Theme, Copyright 2014 The Theme Foundry * Make is distributed under the terms of the GNU GPL */
  • 6. Making a child theme Introduction to WordPress Child Theming Topher DeRosia @topher1kenobe Step 2: add one item to the comment block * Template: make In this example, “make” is the slug of the parent theme.
  • 7. Making a child theme Introduction to WordPress Child Theming Topher DeRosia @topher1kenobe Step 3: include the parent CSS Child theme functions.php: <?php function get_parent_theme_css() { wp_enqueue_style( 'make-theme', get_template_directory_uri() . '/style.css' ); } add_action( 'wp_enqueue_scripts', 'get_parent_theme_css' );
  • 8. Making a child theme Introduction to WordPress Child Theming Topher DeRosia @topher1kenobe Step 4: Optional Screenshot The screenshot that appears on the Themes page comes from screenshot.png in the theme’s folder.
  • 9. Changing Styles Introduction to WordPress Child Theming Topher DeRosia @topher1kenobe ● Any styles placed in the child’s style.css file will override the parent styles. ● !important styles in parent themes are annoying and bad.
  • 10. Template files Introduction to WordPress Child Theming Topher DeRosia @topher1kenobe ● All theme files come from the parent theme, UNLESS they are copied to the child theme. ● Once they’re copied to the child theme they override the version in the parent theme. ● You may copy as many templates as you wish.
  • 11. Gotchas Introduction to WordPress Child Theming Topher DeRosia @topher1kenobe ● The more templates you copy to child, the fewer are getting updated. ● You can’t make grandchildren ● If the parent has a problem, ALL the children have the same problem
  • 12. THANKS FOR LISTENING Introduction to WordPress Child Theming Topher DeRosia @topher1kenobe http://topher1kenobe.com Follow me @topher1kenobe