How To Create a Child Theme in WordPress
As we mentioned in last week’s Ten Tips for WordPress newbs piece, you never want to make changes to your WordPress theme. Instead create a Child Theme and makle changes to that.
It works like this. The site uses all of the coding from the theme except for the coding found in the Child Theme. The Child Theme is a selective over-writing of the original theme.
Anything you do to change your site through the original theme will be lost the next time the theme developers release an update.
Here’s how to create a Child Theme.
I’m gonna assume you know how to FTP into your site and that you have appropriate permissions to write to the server. I’m also going to assume you’re using Comic Easel, but this process works the same for other themes.
- Create a folder of your desktop with the name of your theme. Don’t use spaces… use “_” or “-” between words instead.
- Using a text editor (Notepad, in Windows; TextEdit, in Mac*) paste this into an empty page:
/* Theme Name: ***write your theme's name here*** Theme URI:***write your URL here*** Description: My Child Theme of Comic Easel Author: ***your name*** Author URI: Template: easel Version: 0.1.0 */ @import url("../easel/style.css");
- Name this style.css and save it in the folder you created on the desktop.
- Upload the theme folder to /wp-content/themes/.
- Go to Appearance -> Themes
- You’ll see your theme’s name. Click it.