The Importance of Child Theming


Child theming. No… it’s not some term used by party planners.

Child theming is the cloning of a WordPress theme in order to use the copied version for changes, leaving the original (Parent) theme in tact in the event that you need to return to the original settings.

Child theming is a great way to experiment with changes to a theme without jeopardizing the original settings. If you messed something up on the child theme, you can easily re-clone the parent theme and start over. Child theming is also a great way to learn more about theme development if you’re ever interested in creating your own one day.

The Child Theming Process

The process to child theme may seem complicated at first, but once you have it down, the process for other themes will be easy. The following items will be needed when creating a child theme:

  • child theme directory (folder in your server)
  • style.css file
  • functions.php file

The best reference for this will be the WordPress.org site.

  1. First item is to create the child theme directory in your server files. It should be located in the wp-content/themes folder where you’ll also find the parent theme.
  2. Give the file a name that differs from the parent theme. Many developers name it the parent name followed by “-child”.
  3. The style.css file will need to be created for the child theme with the following coding in the header. Any changes done to the style of your child theme will be done in the style.css, which will be displayed on your screen through the following step.css_coding
  4. The last item to setup is the functions.php file. This file acts as the glue between the parent and child. Instead of transferring all the files from the parent theme over to the child, the use of a single function.php file with an enqueue script action will help feed the parent information to your site without affecting loading times for the style changes.php_coding
  5. Once you have the files setup in the child directory, you can upload and activate the theme into WordPress. You’ll be able to differentiate the child from the parent by the manner in which you renamed the child theme.

Congratulations, you’ve successfully created and activated a child theme for your site! Now take some time to play with the styling to customize it to your liking. Best of luck!


No Comments

Leave a Reply