0:00
Hi everyone, welcome to K2 blogging and in this video I will show you how you can install
0:03
child theme in your generate press theme. So let's check how we can do that
0:07
And if you found this video helpful, then make sure to hit the like button
0:11
Let's first install the main theme or the parent theme of generate press theme
0:15
So as you can see that I have clicked the add new button and let me install the generate
0:19
press theme here. Now after installing the generate press theme, let me just activate this and let me just
0:25
view this side as well. And as you can see that generate press theme is installed
0:29
Now let's check how we can install the child theme. So why you need to install a child theme
0:34
So child theme helps you add custom function file to your theme so that if you update your
0:40
theme, then it will not delete from the theme file. So child theme helps in that purpose, or you can use the code manager plugin as well if
0:49
you don't want to use the child theme. So here in this tutorial, I will show you how you can install the child theme for generate press
0:56
So after install the parent theme in your WordPress website, let's install the child theme
1:01
So for this, you need the child theme file. So for this, I will go to the official documentation of generate press theme
1:08
As you can see that they have shown the instruction on how to install the child theme, and they
1:13
have given the option to download the child theme. So let's click on here
1:16
And you can see that the generate press child theme file is downloaded to our computer
1:22
So we just need to simply upload the file and activate this child theme
1:26
That is how simple it is. So what I can do is I will click on add new here
1:31
And I will click on upload theme and I will choose that generate press child theme
1:36
So this is a blank child theme. So you will not get any styling and it will give a simple function file for you
1:43
So let's activate it here. And now let's go to the front end and let's refresh this page
1:50
And you can see that there is no changes in the main theme. That's because the all the stylings and functions, JavaScript and everything is inherited from
1:59
your parent theme. But the child theme help you edit your code
2:03
So as you can see that generate press child theme is installed here
2:08
And if you go to the theme file editor, you will see this option generate press child theme
2:13
So let's click on I understand. And as you can see that there is multiple options
2:16
You can check the parent theme code here. So if you change anything, then it will break your theme site
2:23
So make sure to use a child theme. So if you use a child theme here, then if you do any changes, then you can easily delete
2:31
all the code from your child theme and it will not affect the parent theme of your website
2:37
And here you will see two different options. One is style.css and one is function.php file
2:42
So if you want to put any custom function to your website, then you can put it here
2:47
as well in the function.php file. And if you want to put any CSS files, then you can put it on style sheet style.css
2:56
And if you are not using any style sheets, then you can also block that from loading
3:01
in your front end. So they have also shown how to do that. So simply just use this function.php file here and you can easily put it in the PHP
3:12
here main function. So if you put this here, then this style sheet style.css won't be load in the front end
3:21
So in this way, you can block that style sheet or style.css file from the front end
3:26
And if you want to add your custom CSS file, then you can leave it like that
3:30
So let me just update it here. And this is how you can install a child theme in your generate press theme
3:37
So if you found this video helpful, then make sure to hit the like button. And if you have any doubt regarding this, then you can ask me in the comment section
3:44
I will see you in the next one. Bye bye