 Child themes, the main topic of the day. So child themes is like a mirror of the theme you decide to install on your WordPress. So let's say you want to go with WordPress 2017 theme to install on your website. If you need to customize your website to look the way you want it to be, you need to install it without losing your customizations once you update the parent theme. You need to install a child theme. The child theme one allows you to change some aspect of your site's appearance while preserving the look and functionality of your theme. So if your theme is for commerce, for blogging, just create a child theme, and then it will adopt the functionality of the parent theme. And then the customization you make, they won't go to the parent theme. They'll go to your child theme. So let's say you want to move your logo to the center and go to the left of your theme. Or you have to change the menu to be under the logo or something like that. You need to install a child theme and then do the customization because if you do the customization with your parent theme, the theme that you buy from someone will be installed from the WordPress repository. Once the editor of the theme decides to update the theme, you lose all the customization you did. So it will go back to basics if you're dying customizations. The second thing, if you want to develop a website, you have two options. Pick a template or design from scratch. A child theme allows you to pick a template and then customize from there. So you can start from 50% or 60% or 70% and customize your website the way you want it to be. And then if you're new to WordPress, let's say you want to build things in the future, sell things in the future. If you want to learn how things work or how websites are built in WordPress, the best way to start is by building a child theme. So you just get a template of a theme, install it, and then you install a child theme. And then from there, you can start customizing templates of how your home page should look like, your blog page, your contact page, something like that. So why should you need a child theme? The moment you start asking yourself questions like this, I wish my site could look like this, the logo should be on the right, not on the left, like the widget should be on the right, not on the left, or just one column. The moment you open a page and you're like, ah, I don't like how it looks, you get a child theme. And then the moment you decide, you feel like, okay, I don't like where the comment section is or where the subscription button is, something like that. And then finally, if you get a template and you're like, okay, it has a widget somewhere and you don't feel like you need that widget there, or if you need a website that doesn't need any commenting or anything like that. So just get a child theme, edit the coding, and then you remove the commenting section. So creating a child theme, you have two options. You can go the manual way, or you can use a plugin. And today, we're going to start with how to create a child theme manually, like just create a folder on the file. So creating a child theme manually, the first thing you need to do is create a folder. And then the folder, you need to name it. If let's say your parent theme is parent theme, or let's just say parent, and then you need to create a child theme. So you need to name the folder parent, and then you add child at the end. And then inside that folder, which will be in your WordPress themes folder, you create true files, style of CSS, which is mandatory to create a child theme, and function that PHP, which is optional if you need to create some custom codes later. So let's say this is your parent theme. This will be your child theme, and it should be in the same folder as where your parent theme is. And then you just add the child, and then you create these two folders, two files, I mean. The style, the CSS file needs to have some details for it to make it a child theme. The first thing is the name, and then the second thing is the template. The template tells WordPress that this is a child theme of a certain parent theme. So if this is a child theme of 2014, we'll include the template name of the parent theme, which is 2014, which you can find on your parent theme's function with PHP or something like that, style CSS. So if you just open your parent theme's style or CSS of function with PHP, you'll find this information, function PHP dot PHP. So this file, it has some, you can use it to customize it in the way you want it, but the main functions, when you're creating a child theme for function with PHP is enqueuing styles and scripts. So let's say when you create a child theme, it doesn't adopt the styling of the parent theme automatically. So the first thing you need to do is enqueue the style of the parent theme. And to do that, you have to, this is some code and we won't go into it, but the function you have to include is function my child theme scripts, which this function picks the child, the styling file from the parent CSS, and drops it on the child theme. So when someone's open your website, when you have the child being activated, it will look exactly the same as the parent theme. And then second thing is, let's say you need to add a custom PHP script on your website, something that wasn't in the parent theme, but you need to add to your theme. This is where you add your functionality. So whenever the editor of the parent theme decides to update the theme, you won't lose your customizations in any way. Yeah, I'll talk about this. And then the second option is creating a child theme using a plugin. This is the safest and the easiest way to take you like 30 seconds if you have good internet. So the thing you need to do is go to plugins, add new, and then you search child theme configurator. This is my suggested plugin, the one I've been using all through and has been working fine. So you go to plugins, add new, and then search child theme configurator, and then you find the plugin in that picture. And then you click install, install now, and then activate. Once you activate it, it will go to tools, I guess tools on your WordPress W admin page, and then child theme. Once you click on that, you'll have this kind of page. So you'll have the option of creating a new theme, a new child theme, configuring an existing child theme is created in one manually, and you need to enqueue the scripts, the styling and the scripts from the parent theme. You select the second option. If you want to duplicate a child theme, so you can customize it differently, you select the third option, and then resetting an existing child theme, so it goes back to basic like, it will remove all the customization you've done to it. So the first thing, the second thing you need to go is to do is select a parent theme. So the theme that you have currently on your website that you want to customize, the one you select here, and then you analyze. This plugins allows you, it will analyze the theme automatically. So it will tell you if the theme will use at imports enqueuing script, or it will just enqueue the scripts automatically. So the fourth thing is the name of the child theme. So you enter the name, the one you need, like you can customize the name of the child theme to whichever you need. But to be on the safe side, you need to add the child so that whenever anyone logs into your WordPress dashboard, they'll know it's a child theme for a certain theme. The pros of using a plugin, it will automatically determine the correct way to set up a child theme based on the parent theme configuration. So if you don't manually, you'll have to go step by step by step by step. So if a theme, let's say it doesn't support enqueuing a script or a style, you'll have to use the import functions, which is too much work, I can say. And then it'll find the exact style selectors, like if you need, if you don't know where to find the parent theme name to include in your, parent theme template name to include your child theme when you're doing it manually. Just go with the child theme configuration plugin. It will select that automatically. And then let's say you have a website, you've been working on it for like, let's say the last one year, and you've been using the parent theme and you're like, okay, I need to customize some things. And you've already customized some things on your parent website, like you've changed the location of the logo, the widgets and something like that. So if you use a plugin, it will automatically copy your customization from the parent theme and put it on your child theme. So you won't have to start from zero again once you install the child theme. And then automatically choose the style she's there. Installing and activating a child theme. I guess once you've opened a child theme, our WordPress website, you know how to install a theme. If you don't just go to appearance and then themes, and then up there is a button to upload your new theme, something like that. And then once you've created your theme, if you've created it manually on your desktop, not on your website backend, you need to upload it to your WordPress installation. But if you use a plugin, once you go to appearance theme, you'll find it automatically created. So you see this is the parent theme and then the child. So just go to activate the child theme. And then maybe if you need to look, see how your theme will look like before activating it, you can just click live preview. It will show you a theme will look like once you activate the child theme. Another function or the benefit of having a child theme is editing and overriding parent themes templates. So templates are files which determines how your homepage will look like, your blog post will look like, your comment section will look like. So everything has this kind of file too. In every, like in this, let's say this is a folder of a theme. Index PHP will decide how your homepage, when someone logs into your website, is how they'll see it. The header is where your menu and your logo will be and how they look like. And then the page, page.php decides determines how any page you create on your WordPress files on your WordPress website will look like. So let's say you have a problem with, let's say a page on your WordPress installation and you're like, I need to change. This page should be, let's say two columns or three columns, something like that. You need to copy this file page from the parent theme and then you copy it to your child theme. So just copy it directly from the parent theme and then to the child theme folder. Once you do that, any customization you make on that file will automatically reflect on your website. And once a parent theme is updated, you want to lose the customization you did on your template file. And let's say your theme doesn't have a template file for a page you need. Let's say you need your About Us page to look differently from any other page or your 404 page to look differently or your homepage to look differently. So the first thing you go is create a page and then you add in the front, let's say page dot 404 or page dot slash homepage and then you customize it the way you need. So if your homepage looks a certain way when you start, it does like one column and you need to have like three columns. Once for widgets and searching, the main content and then some other things on the other column. You create your file on your charging folder and then once you open your page, WordPress will automatically pick the page depending on how you named it. So if there's some customization you need to do on your naming for WordPress to pick it automatically. Key pointers, parent theme is still master. Once you create a child theme, it doesn't make it like the master theme. What child theme does is just scoping what parent theme is doing. So any changes made to the parent theme will somehow affect the child theme. So if you need to be on a safe side, make sure every time a parent theme is updated, you compare it with your child theme so that if there's any functionality you include on your child theme and then it's updated on the parent theme, you need to edit it. That's the second point actually. So in queuing and reference any new files on scripts. So you've installed a child theme, you've created everything, and then you need to add some template files on your child theme. WordPress won't automatically pick it and then display it on the front end. You need to somehow tell WordPress that this is my child theme, these are my custom functions or templates. You need to copy it from the child theme and then display it on my website. Same point I made it on the first one. And then you need a child theme. So let's say you have a theme that you like 90% and then you have like 10% of it you don't like, some aspects of it you can create a child theme. But let's say you get a template, you like 30% of it, 70% of it you don't like. So there's no need of creating a child theme to make customization of 80% of your website. It's better for you to just create a theme, a parent theme, and then do the customization the way you like it. Same point in the last one. And that's it for me.