SlideShare a Scribd company logo
Child Themes
What is a Child
Theme?
A Child Theme Is a Theme
Built on Another Theme
You pick your theme, then you can customize it using a
child theme, so it still is essentially the same theme, just
*your* way.
A Child Theme Needs a
Parent
A child theme inherits the characteristics of the parent
theme, from the function to the appearance. The only
changes to the parent are what you make in the child
theme.
A Child Theme Only Needs
One File
At its core, a child theme only needs a style.css file in a
folder to be a child theme. You can have as many files
as you need or want, but you only need a few lines of
CSS to make a child theme. You should do it using a
functions.php file, but that is not strictly necessary.
Why Child Themes?
Safe Upgrading
• If you make any changes to your theme, all
your changes can be lost when you update.
Quickly Get a Customized
Theme
• You’re not reinventing the wheel; the core
development is done for you.
• You only have to change the things you want,
you can leave everything else.
Learn Theme
Development
• You can learn how themes work by modifying
code that others have written.
How to Child
Theme?
Select Your Parent
Theme• Perhaps you are using an existing theme (you
already mostly like how your theme works)
• If not, you’d need to select a theme to customize
how you want.
• I’d recommend using a well-known theme that is
a solid base, and isn’t elaborate (so you can
customize it how you want)
• One of the default (twenty themes), Genesis, or
Storefront (for a WooCommerce site)
Create Your Child
Theme
• Create the folder on your development site
(locally or development online) in `wp-
content/themes`
• It might be easier to keep things straight if
you name it `parenttheme-child` (no spaces!)
Create Your Child Theme
Pt. 2
• Create a text file, and name it style.css
/*
Theme Name: Rockford WordPress Meetup Child
Theme
Description: Twenty Seventeen Child Theme
Author: Andrew Wikel
Template: twentyseventeen
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: light, dark, two-columns, right-sidebar,
responsive-layout, accessibility-ready
Text Domain: twenty-seventeen-child
*/
Create Your Child Theme
Pt. 3
• This will give you a completely styleless site
right now.
• Create a text file named functions.php
Create Your Child Theme
Pt. 4
• If you want to get all fancy, you could add a
theme image. This image will show up in the
theme menu in WordPress.
• All you need to do is create a PNG file, named
screenshot.png, and place it in your theme’s
folder (in our case, twentyseventeen-child).
Make sure to put it in the top-level directory and
not in a subdirectory such as images.
• The recommended size is 880 × 660 pixels,
although it will be shown as 387 × 290. The
larger dimensions ensure that the image will
show up well on high-resolution screens.
How to Use Your
New Child Theme
How It Works
(technically)• Your child theme’s style.css will override the parent style.css if they
have the same rules.
• Other than the functions.php file, any file you add to your child
theme will override the same file in the parent theme.
• In most cases, it’s best to create a copy of the template files you
want to change from the parent theme, then make your
modifications to the copied files, leaving the parent files
unchanged. For example, if you wanted to change the code of the
parent theme’s header.php file, you would copy the file to your
child theme folder and customize it there.
• Your child functions.php is loaded in addition to (right before)
your parent functions. That’s why we don’t copy the contents of
that.

More Related Content

What's hot

Theme frameworks & child themes
Theme frameworks & child themesTheme frameworks & child themes
Theme frameworks & child themes
Chris Olbekson
 
Don't Let the Wrong Theme Choice Ruin Your New WordPress Site
Don't Let the Wrong Theme Choice Ruin Your New WordPress SiteDon't Let the Wrong Theme Choice Ruin Your New WordPress Site
Don't Let the Wrong Theme Choice Ruin Your New WordPress Site
BobWP.com
 
WPAZ Child Themes
WPAZ Child ThemesWPAZ Child Themes
WPAZ Child Themes
certainstrings
 
What is WordPress and Why Is Everyone Talking About it
What is WordPress and Why Is Everyone Talking About itWhat is WordPress and Why Is Everyone Talking About it
What is WordPress and Why Is Everyone Talking About it
BobWP.com
 
Getting the Most out of the Genesis Theme Framework
Getting the Most out of the Genesis Theme FrameworkGetting the Most out of the Genesis Theme Framework
Getting the Most out of the Genesis Theme Framework
East Bay WordPress Meetup
 
April 2016 - Atlanta WordPress Users Group - Child Themes
April 2016 - Atlanta WordPress Users Group - Child ThemesApril 2016 - Atlanta WordPress Users Group - Child Themes
April 2016 - Atlanta WordPress Users Group - Child Themes
Eric Sembrat
 
WordPress Theme Workshop: Part 1
WordPress Theme Workshop: Part 1WordPress Theme Workshop: Part 1
WordPress Theme Workshop: Part 1
David Bisset
 
Keeping Your Themes and Plugins Organized.
Keeping Your Themes and Plugins Organized.Keeping Your Themes and Plugins Organized.
Keeping Your Themes and Plugins Organized.
Jacob Martella
 
Themes 101
Themes 101Themes 101
Themes 101
Jacob Martella
 
The Art of WordPress
The Art of WordPressThe Art of WordPress
The Art of WordPress
COLAB
 
WordPress Theme Workshop: Part 0
WordPress Theme Workshop: Part 0WordPress Theme Workshop: Part 0
WordPress Theme Workshop: Part 0
David Bisset
 
WordPress Child Themes
WordPress Child ThemesWordPress Child Themes
WordPress Child Themes
Alison Foxall
 
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
 
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
 
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
 
Customizing WordPress Themes
Customizing WordPress ThemesCustomizing WordPress Themes
Customizing WordPress Themes
Laura Hartwig
 
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
 
WordPress Themes Demystified
WordPress Themes DemystifiedWordPress Themes Demystified
WordPress Themes Demystified
Chris Burgess
 
Genesis framework presentation
Genesis framework presentationGenesis framework presentation
Genesis framework presentation
Thu Phan
 
Why Blogs Are Better
Why Blogs Are BetterWhy Blogs Are Better
Why Blogs Are Better
Tris Hussey
 

What's hot (20)

Theme frameworks & child themes
Theme frameworks & child themesTheme frameworks & child themes
Theme frameworks & child themes
 
Don't Let the Wrong Theme Choice Ruin Your New WordPress Site
Don't Let the Wrong Theme Choice Ruin Your New WordPress SiteDon't Let the Wrong Theme Choice Ruin Your New WordPress Site
Don't Let the Wrong Theme Choice Ruin Your New WordPress Site
 
WPAZ Child Themes
WPAZ Child ThemesWPAZ Child Themes
WPAZ Child Themes
 
What is WordPress and Why Is Everyone Talking About it
What is WordPress and Why Is Everyone Talking About itWhat is WordPress and Why Is Everyone Talking About it
What is WordPress and Why Is Everyone Talking About it
 
Getting the Most out of the Genesis Theme Framework
Getting the Most out of the Genesis Theme FrameworkGetting the Most out of the Genesis Theme Framework
Getting the Most out of the Genesis Theme Framework
 
April 2016 - Atlanta WordPress Users Group - Child Themes
April 2016 - Atlanta WordPress Users Group - Child ThemesApril 2016 - Atlanta WordPress Users Group - Child Themes
April 2016 - Atlanta WordPress Users Group - Child Themes
 
WordPress Theme Workshop: Part 1
WordPress Theme Workshop: Part 1WordPress Theme Workshop: Part 1
WordPress Theme Workshop: Part 1
 
Keeping Your Themes and Plugins Organized.
Keeping Your Themes and Plugins Organized.Keeping Your Themes and Plugins Organized.
Keeping Your Themes and Plugins Organized.
 
Themes 101
Themes 101Themes 101
Themes 101
 
The Art of WordPress
The Art of WordPressThe Art of WordPress
The Art of WordPress
 
WordPress Theme Workshop: Part 0
WordPress Theme Workshop: Part 0WordPress Theme Workshop: Part 0
WordPress Theme Workshop: Part 0
 
WordPress Child Themes
WordPress Child ThemesWordPress Child Themes
WordPress 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
 
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
 
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
 
Customizing WordPress Themes
Customizing WordPress ThemesCustomizing WordPress Themes
Customizing WordPress 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)
 
WordPress Themes Demystified
WordPress Themes DemystifiedWordPress Themes Demystified
WordPress Themes Demystified
 
Genesis framework presentation
Genesis framework presentationGenesis framework presentation
Genesis framework presentation
 
Why Blogs Are Better
Why Blogs Are BetterWhy Blogs Are Better
Why Blogs Are Better
 

Similar to Rockford WordPress Meetup - Child Themes

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
 
Intro to child themes
Intro to child themesIntro to child themes
Intro to child themes
vegasgeek
 
Meetup child-themes
Meetup child-themesMeetup child-themes
Meetup child-themes
DaisyOlsen
 
WordPress Child Themes
WordPress Child ThemesWordPress Child Themes
WordPress Child Themes
rfair404
 
Intro to WordPress Child Themes
Intro to WordPress Child ThemesIntro to WordPress Child Themes
Intro to WordPress Child Themes
vegasgeek
 
WordPress Child Themes
WordPress Child ThemesWordPress Child Themes
WordPress Child Themes
openchamp
 
Responsive themeworkshop wcneo2016
Responsive themeworkshop wcneo2016Responsive themeworkshop wcneo2016
Responsive themeworkshop wcneo2016
David Brattoli
 
Introduction to WordPress Child Theming, WordCamp Kansas City, 2015
Introduction to WordPress Child Theming, WordCamp Kansas City, 2015Introduction to WordPress Child Theming, WordCamp Kansas City, 2015
Introduction to WordPress Child Theming, WordCamp Kansas City, 2015
topher1kenobe
 
Child Theme
Child ThemeChild Theme
Child Theme
Shinichi Nishikawa
 
Week 9 - Introduction to Child Themes
Week 9  - Introduction to Child ThemesWeek 9  - Introduction to Child Themes
Week 9 - Introduction to Child Themes
henri_makembe
 
WordCamp Reno 2011 - Intro to Genesis Child Themes
WordCamp Reno 2011 - Intro to Genesis Child ThemesWordCamp Reno 2011 - Intro to Genesis Child Themes
WordCamp Reno 2011 - Intro to Genesis Child Themes
vegasgeek
 
WordPress and Child Themes
WordPress and Child ThemesWordPress and Child Themes
WordPress and Child Themes
nairobiwordcamp
 
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
LightSpeed
 
HTML/CSS for WordPress
HTML/CSS for WordPressHTML/CSS for WordPress
HTML/CSS for WordPress
Kanchha kaji Prajapati
 
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
 
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
 
Working with WordPress themes
Working with WordPress themesWorking with WordPress themes
Working with WordPress themes
Utsav Singh Rathour
 
Introduction to Custom WordPress Themeing
Introduction to Custom WordPress ThemeingIntroduction to Custom WordPress Themeing
Introduction to Custom WordPress Themeing
Jamie Schmid
 
Newbies guide to customizing word press themes 25
Newbies guide to customizing word press themes 25Newbies guide to customizing word press themes 25
Newbies guide to customizing word press themes 25
New Tricks
 
Nanocon Taiwan
Nanocon TaiwanNanocon Taiwan
Nanocon Taiwan
John Albin Wilkins
 

Similar to Rockford WordPress Meetup - Child Themes (20)

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
 
Intro to child themes
Intro to child themesIntro to child themes
Intro to child themes
 
Meetup child-themes
Meetup child-themesMeetup child-themes
Meetup child-themes
 
WordPress Child Themes
WordPress Child ThemesWordPress Child Themes
WordPress Child Themes
 
Intro to WordPress Child Themes
Intro to WordPress Child ThemesIntro to WordPress Child Themes
Intro to WordPress Child Themes
 
WordPress Child Themes
WordPress Child ThemesWordPress Child Themes
WordPress Child Themes
 
Responsive themeworkshop wcneo2016
Responsive themeworkshop wcneo2016Responsive themeworkshop wcneo2016
Responsive themeworkshop wcneo2016
 
Introduction to WordPress Child Theming, WordCamp Kansas City, 2015
Introduction to WordPress Child Theming, WordCamp Kansas City, 2015Introduction to WordPress Child Theming, WordCamp Kansas City, 2015
Introduction to WordPress Child Theming, WordCamp Kansas City, 2015
 
Child Theme
Child ThemeChild Theme
Child Theme
 
Week 9 - Introduction to Child Themes
Week 9  - Introduction to Child ThemesWeek 9  - Introduction to Child Themes
Week 9 - Introduction to Child Themes
 
WordCamp Reno 2011 - Intro to Genesis Child Themes
WordCamp Reno 2011 - Intro to Genesis Child ThemesWordCamp Reno 2011 - Intro to Genesis Child Themes
WordCamp Reno 2011 - Intro to Genesis Child Themes
 
WordPress and Child Themes
WordPress and Child ThemesWordPress and Child Themes
WordPress and 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
 
HTML/CSS for WordPress
HTML/CSS for WordPressHTML/CSS for WordPress
HTML/CSS for WordPress
 
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.
 
Responsive Theme Workshop - WordCamp Columbus 2015
Responsive Theme Workshop - WordCamp Columbus 2015Responsive Theme Workshop - WordCamp Columbus 2015
Responsive Theme Workshop - WordCamp Columbus 2015
 
Working with WordPress themes
Working with WordPress themesWorking with WordPress themes
Working with WordPress themes
 
Introduction to Custom WordPress Themeing
Introduction to Custom WordPress ThemeingIntroduction to Custom WordPress Themeing
Introduction to Custom WordPress Themeing
 
Newbies guide to customizing word press themes 25
Newbies guide to customizing word press themes 25Newbies guide to customizing word press themes 25
Newbies guide to customizing word press themes 25
 
Nanocon Taiwan
Nanocon TaiwanNanocon Taiwan
Nanocon Taiwan
 

Recently uploaded

Bengaluru Dreamin' 24 - Personal Branding
Bengaluru Dreamin' 24 - Personal BrandingBengaluru Dreamin' 24 - Personal Branding
Bengaluru Dreamin' 24 - Personal Branding
Tarandeep Singh
 
快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样
快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样
快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样
3a0sd7z3
 
HijackLoader Evolution: Interactive Process Hollowing
HijackLoader Evolution: Interactive Process HollowingHijackLoader Evolution: Interactive Process Hollowing
HijackLoader Evolution: Interactive Process Hollowing
Donato Onofri
 
怎么办理(umiami毕业证书)美国迈阿密大学毕业证文凭证书实拍图原版一模一样
怎么办理(umiami毕业证书)美国迈阿密大学毕业证文凭证书实拍图原版一模一样怎么办理(umiami毕业证书)美国迈阿密大学毕业证文凭证书实拍图原版一模一样
怎么办理(umiami毕业证书)美国迈阿密大学毕业证文凭证书实拍图原版一模一样
rtunex8r
 
办理新西兰奥克兰大学毕业证学位证书范本原版一模一样
办理新西兰奥克兰大学毕业证学位证书范本原版一模一样办理新西兰奥克兰大学毕业证学位证书范本原版一模一样
办理新西兰奥克兰大学毕业证学位证书范本原版一模一样
xjq03c34
 
Discover the benefits of outsourcing SEO to India
Discover the benefits of outsourcing SEO to IndiaDiscover the benefits of outsourcing SEO to India
Discover the benefits of outsourcing SEO to India
davidjhones387
 
Should Repositories Participate in the Fediverse?
Should Repositories Participate in the Fediverse?Should Repositories Participate in the Fediverse?
Should Repositories Participate in the Fediverse?
Paul Walk
 
一比一原版新西兰林肯大学毕业证(Lincoln毕业证书)学历如何办理
一比一原版新西兰林肯大学毕业证(Lincoln毕业证书)学历如何办理一比一原版新西兰林肯大学毕业证(Lincoln毕业证书)学历如何办理
一比一原版新西兰林肯大学毕业证(Lincoln毕业证书)学历如何办理
thezot
 
快速办理(Vic毕业证书)惠灵顿维多利亚大学毕业证完成信一模一样
快速办理(Vic毕业证书)惠灵顿维多利亚大学毕业证完成信一模一样快速办理(Vic毕业证书)惠灵顿维多利亚大学毕业证完成信一模一样
快速办理(Vic毕业证书)惠灵顿维多利亚大学毕业证完成信一模一样
3a0sd7z3
 
Securing BGP: Operational Strategies and Best Practices for Network Defenders...
Securing BGP: Operational Strategies and Best Practices for Network Defenders...Securing BGP: Operational Strategies and Best Practices for Network Defenders...
Securing BGP: Operational Strategies and Best Practices for Network Defenders...
APNIC
 
Honeypots Unveiled: Proactive Defense Tactics for Cyber Security, Phoenix Sum...
Honeypots Unveiled: Proactive Defense Tactics for Cyber Security, Phoenix Sum...Honeypots Unveiled: Proactive Defense Tactics for Cyber Security, Phoenix Sum...
Honeypots Unveiled: Proactive Defense Tactics for Cyber Security, Phoenix Sum...
APNIC
 
一比一原版(USYD毕业证)悉尼大学毕业证如何办理
一比一原版(USYD毕业证)悉尼大学毕业证如何办理一比一原版(USYD毕业证)悉尼大学毕业证如何办理
一比一原版(USYD毕业证)悉尼大学毕业证如何办理
k4ncd0z
 

Recently uploaded (12)

Bengaluru Dreamin' 24 - Personal Branding
Bengaluru Dreamin' 24 - Personal BrandingBengaluru Dreamin' 24 - Personal Branding
Bengaluru Dreamin' 24 - Personal Branding
 
快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样
快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样
快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样
 
HijackLoader Evolution: Interactive Process Hollowing
HijackLoader Evolution: Interactive Process HollowingHijackLoader Evolution: Interactive Process Hollowing
HijackLoader Evolution: Interactive Process Hollowing
 
怎么办理(umiami毕业证书)美国迈阿密大学毕业证文凭证书实拍图原版一模一样
怎么办理(umiami毕业证书)美国迈阿密大学毕业证文凭证书实拍图原版一模一样怎么办理(umiami毕业证书)美国迈阿密大学毕业证文凭证书实拍图原版一模一样
怎么办理(umiami毕业证书)美国迈阿密大学毕业证文凭证书实拍图原版一模一样
 
办理新西兰奥克兰大学毕业证学位证书范本原版一模一样
办理新西兰奥克兰大学毕业证学位证书范本原版一模一样办理新西兰奥克兰大学毕业证学位证书范本原版一模一样
办理新西兰奥克兰大学毕业证学位证书范本原版一模一样
 
Discover the benefits of outsourcing SEO to India
Discover the benefits of outsourcing SEO to IndiaDiscover the benefits of outsourcing SEO to India
Discover the benefits of outsourcing SEO to India
 
Should Repositories Participate in the Fediverse?
Should Repositories Participate in the Fediverse?Should Repositories Participate in the Fediverse?
Should Repositories Participate in the Fediverse?
 
一比一原版新西兰林肯大学毕业证(Lincoln毕业证书)学历如何办理
一比一原版新西兰林肯大学毕业证(Lincoln毕业证书)学历如何办理一比一原版新西兰林肯大学毕业证(Lincoln毕业证书)学历如何办理
一比一原版新西兰林肯大学毕业证(Lincoln毕业证书)学历如何办理
 
快速办理(Vic毕业证书)惠灵顿维多利亚大学毕业证完成信一模一样
快速办理(Vic毕业证书)惠灵顿维多利亚大学毕业证完成信一模一样快速办理(Vic毕业证书)惠灵顿维多利亚大学毕业证完成信一模一样
快速办理(Vic毕业证书)惠灵顿维多利亚大学毕业证完成信一模一样
 
Securing BGP: Operational Strategies and Best Practices for Network Defenders...
Securing BGP: Operational Strategies and Best Practices for Network Defenders...Securing BGP: Operational Strategies and Best Practices for Network Defenders...
Securing BGP: Operational Strategies and Best Practices for Network Defenders...
 
Honeypots Unveiled: Proactive Defense Tactics for Cyber Security, Phoenix Sum...
Honeypots Unveiled: Proactive Defense Tactics for Cyber Security, Phoenix Sum...Honeypots Unveiled: Proactive Defense Tactics for Cyber Security, Phoenix Sum...
Honeypots Unveiled: Proactive Defense Tactics for Cyber Security, Phoenix Sum...
 
一比一原版(USYD毕业证)悉尼大学毕业证如何办理
一比一原版(USYD毕业证)悉尼大学毕业证如何办理一比一原版(USYD毕业证)悉尼大学毕业证如何办理
一比一原版(USYD毕业证)悉尼大学毕业证如何办理
 

Rockford WordPress Meetup - Child Themes

  • 2. What is a Child Theme?
  • 3. A Child Theme Is a Theme Built on Another Theme You pick your theme, then you can customize it using a child theme, so it still is essentially the same theme, just *your* way.
  • 4. A Child Theme Needs a Parent A child theme inherits the characteristics of the parent theme, from the function to the appearance. The only changes to the parent are what you make in the child theme.
  • 5. A Child Theme Only Needs One File At its core, a child theme only needs a style.css file in a folder to be a child theme. You can have as many files as you need or want, but you only need a few lines of CSS to make a child theme. You should do it using a functions.php file, but that is not strictly necessary.
  • 7. Safe Upgrading • If you make any changes to your theme, all your changes can be lost when you update.
  • 8. Quickly Get a Customized Theme • You’re not reinventing the wheel; the core development is done for you. • You only have to change the things you want, you can leave everything else.
  • 9. Learn Theme Development • You can learn how themes work by modifying code that others have written.
  • 11. Select Your Parent Theme• Perhaps you are using an existing theme (you already mostly like how your theme works) • If not, you’d need to select a theme to customize how you want. • I’d recommend using a well-known theme that is a solid base, and isn’t elaborate (so you can customize it how you want) • One of the default (twenty themes), Genesis, or Storefront (for a WooCommerce site)
  • 12. Create Your Child Theme • Create the folder on your development site (locally or development online) in `wp- content/themes` • It might be easier to keep things straight if you name it `parenttheme-child` (no spaces!)
  • 13. Create Your Child Theme Pt. 2 • Create a text file, and name it style.css /* Theme Name: Rockford WordPress Meetup Child Theme Description: Twenty Seventeen Child Theme Author: Andrew Wikel Template: twentyseventeen Version: 1.0.0 License: GNU General Public License v2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html Tags: light, dark, two-columns, right-sidebar, responsive-layout, accessibility-ready Text Domain: twenty-seventeen-child */
  • 14. Create Your Child Theme Pt. 3 • This will give you a completely styleless site right now. • Create a text file named functions.php
  • 15. Create Your Child Theme Pt. 4 • If you want to get all fancy, you could add a theme image. This image will show up in the theme menu in WordPress. • All you need to do is create a PNG file, named screenshot.png, and place it in your theme’s folder (in our case, twentyseventeen-child). Make sure to put it in the top-level directory and not in a subdirectory such as images. • The recommended size is 880 × 660 pixels, although it will be shown as 387 × 290. The larger dimensions ensure that the image will show up well on high-resolution screens.
  • 16. How to Use Your New Child Theme
  • 17. How It Works (technically)• Your child theme’s style.css will override the parent style.css if they have the same rules. • Other than the functions.php file, any file you add to your child theme will override the same file in the parent theme. • In most cases, it’s best to create a copy of the template files you want to change from the parent theme, then make your modifications to the copied files, leaving the parent files unchanged. For example, if you wanted to change the code of the parent theme’s header.php file, you would copy the file to your child theme folder and customize it there. • Your child functions.php is loaded in addition to (right before) your parent functions. That’s why we don’t copy the contents of that.