How to make a WordPress Child Theme

YouTube player

At some point, in the initial stages of getting to know how WordPress operates, most everyone must ponder how to create their very own theme to accomodate a website or blog.  Instead of learning how to write the complicated code that goes into the making of a theme, we can create our own customized WordPress themes, in a “Child Theme”, by simply using CSS or cascading style sheets.
CSS is used to format and alter the appearance of HTML, which every web page is based on.  With CSS, you can alter your websites color, style, text, dimensions, borders, spacing and the overall layout of a webpage.

To create your child theme you will need to do the following:

  • Download a free text editor, preferably Text Wrangler for Mac, Notepad++ for Windows and Geany for Linux users.
  • Create a new text document and save it as style.css.
  • Insert the following code into your document…

/* Theme Name: Twenty Twelve Child

ThemeURI: http://example.com/

Description: Child theme for the Twenty Twelve theme

Author: Your name here Author URI: http://example.com/about/

Template: twentytwelve Version: 0.1.0 */

@import url(“../twentytwelve/style.css”);

When using a WordPress theme other than the Twenty Twelve theme, you’ll need to change the “import url” folder to fi which ever theme it is your using accordingly. The information after the colons, describing your child theme, do not need to specify anything about the theme for it to work properly and as a matter of fact, you only need the “Theme Name” and “Template” filled out for it to function.

Now you can make your CSS changes and upload the child theme, or style.css file, to the “theme’s” folder in your WordPress directory using an FTP Client. To Find out how to use an FTP (file transfer protocol), such as FileZilla, check out this article.

To activate your child theme look to the backend of your WordPress website or blog, after uploading the style.css file to the appropriate fold, and it will show up along side other themes in appearance > themes.