We create beautiful & user-friendly websites and provide quality web development services worldwide.
Contact us to get started on your project.

Best Practice

How to Work with WordPress Child Themes

Published by Veron Ang | Leave a comment

designSome of us work with ready-to-use WordPress themes, such as those purchased from marketplaces like Themeforest. These themes usually come with life-long updates from the developer. If you are into modifying your themes, you will want to make changes in a way that future updates do not override any changes you made. For such a purpose, Child Themes play an important role.

A theme that supports Child Themes is made up of 2 folders: the parent theme folder and the child theme folder (with the suffix -child). The child theme inherits the styles, layout and functionality of the parent theme.

To make any coding changes to the theme, here’s the way to do it.

  1. Copy over the template file, for eg. single.php, from the parent theme folder into the child theme folder.
  2. Make changes to the copy of the file in the child theme. This file will override the equivalent file in the parent theme directory when your site loads.

The only exceptions will be for the files functions.php and style.css, for which you should simply add on your own functions and classes/IDs without copying the original files over.


About the Author

Veron Ang is a , developer and WordPress expert at Sparklette Studio. She graduated with a bachelor's degree in computer science from the National University of Singapore. Engage her to work on your next project by sending her a message from the contact page or on Twitter.

Leave a comment