Living vicariously through your child…theme
WordPress is an awesome tool in that it allows people to take an existing theme, one that some generous developer has spent hours and hours creating, and customize it through simple to complex modifications to the CSS and PHP files that accompany it with the install. In essence, it provides the backend programming that gives our sites the powerful functionality that allows visitors to our site to actually interact with us. But, like everything else involved with WordPress, themes are updated from time to time and if you want to apply these often-times necessary updates to your site you will lose most, if not all, of the modifications you made to style your site and make it your own. This can be not only frustrating, but time consuming if you constantly have to re-style your site to represent your brand.
Luckily, the good folks at WordPress have a solution; child themes. A child theme inherits all the functionality of another theme, the parent, allowing you to modify the look, feel and functionality of it without causing problems when that theme is updated. And creating a child theme is much simpler than you might think. Basically all you have to do is create a new directory within your “Themes” folder, name it something different from the parent (i.e. child of parent theme) and add its own style.css file. Voila! Now you have a fully functioning child theme that takes on all the characteristics of its parent while developing its own personality through creativity and hard work. Just like a real kid. And making changes to the child’s CSS is much easier than working with the parent’s, since there aren’t lines and lines of code to search through when looking for a particular element to change. For instance, say you want to change the color of all your h1 tags but want everything else to stay the same. Open the newly created CSS file in your child theme and add:
Now the color of your h1 tag stated in the child’s CSS file will override the color stated in the parent’s CSS and all instances of it across your site will reflect that change. Of course, this is just a simple example and modifying child themes can get quite complex, depending on what you’re trying to accomplish. PHP files can be modified to change functionality and layout, custom pages can be added and much, much more. The point is making a child theme is not difficult and it can save you tons of time and frustration down the road.
Developing a child theme is a simple and highly recommended practice when modifying existing WordPress themes for personally or professionally branded sites. Make your parent theme proud and grow your child theme into an outstanding citizen in the web community.