Or more specifically, the name of the parent theme’s directory. The Template is the name of the parent theme. Then you will need to add in a new line called Template. Once you have pasted the theme information into your new style.css file, work through to update the information so that it is relevant to your child theme. So what I recommend you do is copy the theme information from the parent theme’s style.css file and paste it into your new style.css file that you have created for your child theme. We will need to put the same information into the style.css file of our child theme, but we will need to make sure it corresponds to the child theme and not the parent theme. They include theme name, URL, description, author, etc. If you’ve ever looked into the style.css file of a WordPress theme (or maybe you’ve created one yourself) you’ll know that every one starts with a few commented out lines of text that provide information about a theme. In your new child theme directory, you need to create a new stylesheet called style.css. When it comes to naming this directory, I recommend naming after the theme you are creating a child theme for, and then adding “-child” on the end. So for example, if you were creating a child theme for the Twenty Seventeen theme, you might call the directory “twentyseventeen-child”. (For the purpose of this tutorial I have included screenshots of me setting this up using FileZilla, which is my FTP client of choice) Then go into the wp-content directory then into the themes directory. This new directory will need to be created in the WordPress theme file, so log in to your FTP account, or head to the file manager within your cPanel account, and navigate to where your WordPress files. In this post, I’ll show you how to create a child theme manually rather than using a plugin.ġ | Create a new directory for your child themeįirst things first, we need to set up a new directory (or folder) for our child theme. You will need to have access to your website files, either via FTP or through cPanel, and you will need to use some PHP, but don’t worry, I’m going to explain everything to make it as easy as possible even for a newbie.Īnd if you are a bit apprehensive about this process, you could always try using a local development environment with WordPress installed to practice! Setting up a child theme manually is a little more hands-on than using a plugin. I’ve already shared a post showing you how to create a child theme using a plugin, but in this post, I wanted to talk you through the process of setting up one manually. If you want to make changes to a WordPress theme then it is best practice to create a child theme.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |