Hey you guys. Thanks for watching another WordPress Wednesday.
My name is Kori Ashton here at WebTegrity in San Antonio, Texas.
We have over 200 videos now inside of this YouTube channel helping you with all
things WordPress.
Today we're going to look at
child themes.
We've talked about them in the past but today we have a question coming off of
Twitter from Angie asking, "What is child theme and do I even need one?"
We're going to look at that question today, "What is a child theme?"
The easiest way to explain it is
that
it's another theme that you activate inside of your WordPress dashboard.
It basically inherits the parent theme.
There would be two themes (in a sense) playing together.
One is the parent theme and the other is the child theme.
The parent theme really holds all the functionality.
It has all the bells and whistles.
So this would be like your major theme that you want to use.
A child theme would come in to play
(you would activate and create a child theme)
if you wanted to make certain customizations.
Doing this allows you to make easier updates.
As the parent theme has an alert to you that says, "hey you're going to need to
update this theme."
You certainly don't want to lose any of your extra customizations.
Now don't panic because a lot of times customizations are saved inside of the
parent theme itself.
Such as, when you update your logo or change the colors of your theme.
These things typically all will always stay saved as you click update inside of a
theme.
So why do you need a child theme?
When would you actually need one?
Here's the deal;
you don't really need need a child theme unless
you're going to go crazy style into the php files or or into the stylesheet
and go make some fun changes.
So let me show you kind of what that looks like.
Going into
the css file (you know when you click on appearance and go to editor)
and you see all this fun stuff.
If you really want to make a change to something (to manipulate a
color or a spacing issue or whatever you want to change inside of your css)
then
you need a child theme.
Or, some themes are very generous and give you something called a custom css box.
You can make your change inside there and overwrite the parent theme without ever
even to have a child theme.
Wow! Was your mind blown yet?
Slow down.
Hold on.
Listen to me for a second.
Changing something inside of your style sheet;
super simple to do if you understand css, right?
You can go into this file and override a change.
The problem is, as soon as the theme itself
requires an update, this stylesheet will be reset back to the default.
You will lose your customization.
In order to save that, WordPress has come up with the idea of these
child themes.
That's really what it is.
Also, diving into any sort of a php file
(you know if you're over here inside of any of your php files) and you want to
make a change to something in here,
this again will be overridden whenever you update the theme.
So you certainly want to have a child theme in place if
you're going crazy, styling, tinkering with all this "nerd code."
If you only need to make a few changes to the css you can even just install a plugin
called, "Simple Custom CSS."
That will give you-
(if we go into Appearance and Custom CSS) that will give you a little css box
that you can overwrite anything inside of the parent theme. Again,
without needing a child theme. Without going to all the extra effort to make a
child theme.
Some theme authors are super
generous and whenever you get their theme and install it, inside of the zip
file you might find one or two other stylesheets and
files
that would be (in fact) your child theme.
Check this out.
Avada does that.
Whenever you install Avada it has multiple child themes and you can pick and choose
from a different
child themes so that you get totally different looks.
That's what all these are down here.
It's pretty crazy cool what you can do with child themes.
The truth is most of us don't need them ever
because you're not going into the css,
you're not going into the php files.
If you are, I have two other videos that we've created.
I'll show you what those are.
This is Jason. He's our lead developer and he did a video on how to build a child
theme from scratch.
You can check this video out. I'll put the link to that in the description box
below.
That's if you really want to be crazy nerdy.
If you just want to figure out how to do it using a plugin,
of course there's a plugin for that.
I have another video here on how to make a WordPress child theme from a plugin.
Again, I'll put the link to these two videos in the description box below.
I hope this helps you a little bit understand and not freak out when it
comes to, "somebody said I need a child theme."
You really don't
unless you're going to go into the css
or go into the php.
Then you're going to need that so you can safely update.
I hope that helps. If you guys have any questions, throw them in the comments below.
I'll see ya next WordPress Wednesday.
Bye, y'all!