Make WordPress Child Theme
Jul 21, 2014
You can make a child theme by creating a directory called [your theme]-child-theme.
Inside of that directory, create style.css and paste in code that looks like this:
/* Theme Name: [Your Theme] Child Description: Child theme for [Your Theme] theme Author: [Your name here] Template: [Your Theme] */ @import url("../[Your Theme]/style.css");
The only very important thing during this process is to ensure that you have case sensitive, matching, exact spelling of [Your Them] in lines 4 and 8 – that spelling needs to match the spelling of the directory where your current theme is kept.
Line 2 sets the name that you will see in your wordpress instance when you’ve navigated to the themes pannel.
Lines 3 and 4 are optional.
Line 5 tells WordPress from which directory to pull parent theme data (which is why it must be the exact name of the directory).
Line 8 tells WordPress to import the stylesheet from the parent theme style.css.
Start your custom code right below line 8.
Comment here, or see the WordPress Codex for more information.
One-Click Child Theme is a great plugin that you could use to make your child theme as well. If your current theme is very complicated, there is a chance that you would need to create other files than the ones that either this tutorial or the WordPress Codex call for. One-Click Child Theme can help expedite the troubleshooting process by automatically scanning the theme for necessary components and creating the appropriate directories.