A framework for Wordpress is a theme structure which can give extra functionality and different options
for designing a web site using themes under the framework called Child themes child themes or installed
themes in a working WordPress website that inherit properties from a parent theme which is present in
the file structure but isn't activated frameworks.
Use this structure to allow their child themes to inherit more functionality and customisation options
than WordPress offers by default.
You can also use a child theme to avoid editing a theme directly and make your changes to the theme
code within the child the files itself.
This means that if the parent theme needs an update you can do so without losing your changes because
the child theme doesn't get updated.
Only the parent theme let's start by checking out what WordPress says about child themes.
It's recommended that use a child theme because if you modify a theme directly and it's updated then
your modifications may be lost.
This is probably the biggest reason and the most important one to use a child.
Instead of updating or changing the parent theme or just a theme by itself it can speed up development
time because you have all of your changes in one location especially if more than one person is working
on the site and it's a great way to learn about WordPress theme development.
In this course you've delved pretty deeply already into how WordPress theme files work and how it connects
to the database and will learn even more about themes and their structure.
When we experiment with child themes in this video theme frameworks take this concept a step further
by providing a fixed parent theme and then allowing developers and developing themselves child themes
that plug in to the parent theme itself.
Let's look into how the Genesis framework works a little bit because this is what we'll be using to
develop some premium Web sites inside of the students area at W.P. of course dot com.
If you go ahead and log in I want to show you the back and dashboard of your students inside of course
dotcom.
And if I just look under appearance's themes you'll see that I have a whole lot of themes available
to you within your dashboard and some of these themes are still populating their screenshots but you
can see that I have the Genesis theme in here but not activated.
And the theme that's activated right now is called the alt. pro theme which is a child theme for Genesis.
Now if I go ahead and write click and open visit the site in a new tab you can see that I'm actually
using the default background images inside of the alt. pro theme and I've just populated it with my
own design and my own content for my purposes here at W.P. of course dot com taking a look back inside
the Wordpress dashboard.
If I hit customize I'll be able to show you some of the custom functionality that Genesis child themes
provide and how I'm able to make this home page look really nice and customize it.
First of all there's front page background images that the theme puts in here and I can actually change
the image into any background image that I like and the front page also has these special widget areas
seven different widget areas that you can populate with whatever you like.
That's my text widget which is number two right here.
And then in front page number three you can see that I've got a title and then I've got the second text
widget which shows two columns right here.
When I have one of the things that many Genesys child themes provide is a front page layout which lets
you customize and make a nice fancy scrolling front page.
Now back in our locally hosted live site we used that new affinity theme here and we were able to customize
it with some of our content but we didn't make any real customizations in the file structure.
But if we wanted to we should install a copy of this called a child theme so that we can place any of
our code changes within that if we look in the dashboard here and just click theme details we can see
that this is just version 1.0 of the affinity theme.
If I were to go into the editor or use my text or code editor called Adam to edit the stylesheet style
that CSSA or if I were to go into the theme functions functions that P file and add any extra functionality
that I want or even any code snippets that I could find on the Internet as soon as this theme updates
it will erase all of my changes.
Now that is unless I have a child theme installed in the next video we're going to install a child theme
for the affinity theme in this local environment so that we can experiment with making some code changes
that wouldn't be ruined when the theme updates you can easily create a child theme for any standalone
theme that you have whether it's a premium theme or a free theme.
However frameworks are already using a child theme and so there's a different way that we'll learn to
make nondestructive edits that wouldn't be overwritten if the child theme gets an update instead of
a framework.
In this video I presented an introduction to child themes in wordpress and also how frameworks use the
child parent theme relationship to add extra functionality and editing ability to WordPress themes in
the next video you'll create your own child theme for the new thety theme by Automattic and make some
fundamental edits to the underlying code.
Then when the developers update the theme to the next version none of it changes and customisations
will be lost.