Creating WordPress Child Themes

A WordPress child theme is a theme which builds on an existing theme, without directly modifying the original theme. This allows you to update the original theme without overwriting and recreating your changes every time.

  • Connect to your website using a SFTP client at schools.4j.lane.edu
  • Go to your school’s web directory: /www/schools/docs/name-of-school
  • Navigate to wp-content/themes/
  • Create a new folder to contain your theme (for example “myschooltheme”)
  • Create a new text file inside this folder, called style.css
  • In this file, add the boilerplate text shown below:
    /*
    Theme Name: My New Theme
    Theme URI: http://www.mythemewebsite.com
    Description: A child theme example.
    Author: My Name
    Author URI: http://www.mypersonalwebsite.com
    Template: twentytwelve
    Version: 1.0
    */
    @import url("../twentytwelve/style.css");
  • If you are basing your theme on something other than Twenty Twelve, change the two references to the “twentytwelve” folder to reflect the desired theme.
  • Go to your WordPress dashboard, then Appearance, then Themes.
  • Activate your new theme.
  • Visit your site to ensure it still looks good.
  • Now you can start adding to your CSS file to modify the look of your site.

Posted in: Applications