﻿1
00:00:00,440 --> 00:00:06,120
A framework for Wordpress is a theme structure which can give extra functionality and different options

2
00:00:06,120 --> 00:00:12,510
for designing a web site using themes under the framework called Child themes child themes or installed

3
00:00:12,510 --> 00:00:18,900
themes in a working WordPress website that inherit properties from a parent theme which is present in

4
00:00:18,900 --> 00:00:22,570
the file structure but isn't activated frameworks.

5
00:00:22,560 --> 00:00:28,050
Use this structure to allow their child themes to inherit more functionality and customisation options

6
00:00:28,340 --> 00:00:30,840
than WordPress offers by default.

7
00:00:30,840 --> 00:00:36,030
You can also use a child theme to avoid editing a theme directly and make your changes to the theme

8
00:00:36,030 --> 00:00:39,300
code within the child the files itself.

9
00:00:39,300 --> 00:00:45,120
This means that if the parent theme needs an update you can do so without losing your changes because

10
00:00:45,120 --> 00:00:46,970
the child theme doesn't get updated.

11
00:00:46,980 --> 00:00:54,410
Only the parent theme let's start by checking out what WordPress says about child themes.

12
00:00:54,690 --> 00:01:01,890
It's recommended that use a child theme because if you modify a theme directly and it's updated then

13
00:01:01,890 --> 00:01:03,690
your modifications may be lost.

14
00:01:03,690 --> 00:01:07,890
This is probably the biggest reason and the most important one to use a child.

15
00:01:07,920 --> 00:01:15,360
Instead of updating or changing the parent theme or just a theme by itself it can speed up development

16
00:01:15,360 --> 00:01:20,550
time because you have all of your changes in one location especially if more than one person is working

17
00:01:20,550 --> 00:01:24,860
on the site and it's a great way to learn about WordPress theme development.

18
00:01:25,200 --> 00:01:30,810
In this course you've delved pretty deeply already into how WordPress theme files work and how it connects

19
00:01:30,810 --> 00:01:35,700
to the database and will learn even more about themes and their structure.

20
00:01:35,730 --> 00:01:43,450
When we experiment with child themes in this video theme frameworks take this concept a step further

21
00:01:43,600 --> 00:01:50,950
by providing a fixed parent theme and then allowing developers and developing themselves child themes

22
00:01:50,950 --> 00:01:53,910
that plug in to the parent theme itself.

23
00:01:56,240 --> 00:02:02,030
Let's look into how the Genesis framework works a little bit because this is what we'll be using to

24
00:02:02,030 --> 00:02:09,250
develop some premium Web sites inside of the students area at W.P. of course dot com.

25
00:02:09,540 --> 00:02:18,780
If you go ahead and log in I want to show you the back and dashboard of your students inside of course

26
00:02:18,810 --> 00:02:19,780
dotcom.

27
00:02:20,400 --> 00:02:28,600
And if I just look under appearance's themes you'll see that I have a whole lot of themes available

28
00:02:28,600 --> 00:02:35,020
to you within your dashboard and some of these themes are still populating their screenshots but you

29
00:02:35,020 --> 00:02:39,910
can see that I have the Genesis theme in here but not activated.

30
00:02:40,330 --> 00:02:50,360
And the theme that's activated right now is called the alt. pro theme which is a child theme for Genesis.

31
00:02:50,620 --> 00:02:57,250
Now if I go ahead and write click and open visit the site in a new tab you can see that I'm actually

32
00:02:57,250 --> 00:03:06,160
using the default background images inside of the alt. pro theme and I've just populated it with my

33
00:03:06,160 --> 00:03:15,070
own design and my own content for my purposes here at W.P. of course dot com taking a look back inside

34
00:03:15,070 --> 00:03:16,890
the Wordpress dashboard.

35
00:03:16,990 --> 00:03:24,520
If I hit customize I'll be able to show you some of the custom functionality that Genesis child themes

36
00:03:24,520 --> 00:03:31,210
provide and how I'm able to make this home page look really nice and customize it.

37
00:03:31,270 --> 00:03:37,180
First of all there's front page background images that the theme puts in here and I can actually change

38
00:03:37,180 --> 00:03:44,560
the image into any background image that I like and the front page also has these special widget areas

39
00:03:44,820 --> 00:03:49,900
seven different widget areas that you can populate with whatever you like.

40
00:03:49,930 --> 00:03:54,640
That's my text widget which is number two right here.

41
00:03:54,640 --> 00:04:05,380
And then in front page number three you can see that I've got a title and then I've got the second text

42
00:04:05,380 --> 00:04:10,100
widget which shows two columns right here.

43
00:04:11,070 --> 00:04:18,620
When I have one of the things that many Genesys child themes provide is a front page layout which lets

44
00:04:18,620 --> 00:04:24,250
you customize and make a nice fancy scrolling front page.

45
00:04:24,270 --> 00:04:32,790
Now back in our locally hosted live site we used that new affinity theme here and we were able to customize

46
00:04:32,790 --> 00:04:38,700
it with some of our content but we didn't make any real customizations in the file structure.

47
00:04:38,850 --> 00:04:45,600
But if we wanted to we should install a copy of this called a child theme so that we can place any of

48
00:04:45,600 --> 00:04:52,350
our code changes within that if we look in the dashboard here and just click theme details we can see

49
00:04:52,350 --> 00:04:57,410
that this is just version 1.0 of the affinity theme.

50
00:04:57,510 --> 00:05:05,250
If I were to go into the editor or use my text or code editor called Adam to edit the stylesheet style

51
00:05:05,250 --> 00:05:14,400
that CSSA or if I were to go into the theme functions functions that P file and add any extra functionality

52
00:05:14,400 --> 00:05:21,870
that I want or even any code snippets that I could find on the Internet as soon as this theme updates

53
00:05:22,290 --> 00:05:25,180
it will erase all of my changes.

54
00:05:25,200 --> 00:05:31,890
Now that is unless I have a child theme installed in the next video we're going to install a child theme

55
00:05:31,890 --> 00:05:38,670
for the affinity theme in this local environment so that we can experiment with making some code changes

56
00:05:38,940 --> 00:05:47,190
that wouldn't be ruined when the theme updates you can easily create a child theme for any standalone

57
00:05:47,210 --> 00:05:51,920
theme that you have whether it's a premium theme or a free theme.

58
00:05:51,920 --> 00:05:59,390
However frameworks are already using a child theme and so there's a different way that we'll learn to

59
00:05:59,390 --> 00:06:06,020
make nondestructive edits that wouldn't be overwritten if the child theme gets an update instead of

60
00:06:06,020 --> 00:06:06,840
a framework.

61
00:06:07,920 --> 00:06:14,970
In this video I presented an introduction to child themes in wordpress and also how frameworks use the

62
00:06:14,970 --> 00:06:22,140
child parent theme relationship to add extra functionality and editing ability to WordPress themes in

63
00:06:22,140 --> 00:06:29,130
the next video you'll create your own child theme for the new thety theme by Automattic and make some

64
00:06:29,130 --> 00:06:31,760
fundamental edits to the underlying code.

65
00:06:31,800 --> 00:06:36,840
Then when the developers update the theme to the next version none of it changes and customisations

66
00:06:36,840 --> 00:06:37,670
will be lost.

