Child Theme
For Urban News theme, we understand that every customer has different needs and requirements, and some developers will want to modify our themes a bit.
This is a completely natural thing and actually something WordPress was built for this. The platform is quite friendly when it comes to all kinds of modifications, not only the obvious functionality modifications through plugins, but there are also various kinds of hacks and hooks you can implement with ease.
WordPress themes also follow a similar path, and that is why the mechanism of child themes was built. Actually, child themes are the recommended way of making modifications to a theme.
In plain English, this means that if you want to change something about the theme you’re using (change something within its source files, that is), you should do it through a child theme.
If you’re a customer of ours, you know that each theme we deliver comes with a pre-made child theme. An example for our personal WordPress theme package.
The child themes we provide are just blank templates that you can build upon. In fact, we encourage you to do so, especially if you’re using our themes to develop sites for your clients.
What is a child theme?
A child theme is simply a theme that inherits the functionality and looks of another theme – the parent.
The whole idea of a child theme is that you can modify, and add to the functionality of that parent theme without modifying it directly. The parent remains intact, everything is built within the child theme.
But this sounds like additional work, right? Why would you want to play around with child themes if you can simply modify the theme you actually want to modify…?
Why you should use child themes
First of all, if you’re not planning on modifying your theme then child themes will be of no use to you.
But if you do then there are three main benefits of using child themes in comparison to modifying a theme directly.
Easy updates
The biggest problem with all kinds of modifications is that they disappear the minute you update WordPress (in case of modifications to the WordPress core) or your theme (in case of direct theme modifications).
Preserving your modifications to make them work after an update is almost impossible if you’ve modified the theme directly.
The update mechanism in WordPress is a rather simple one – new files are copied in place of the old files, nothing fancy.
If you’re using a child theme, however, you don’t have to worry about any updates. Whenever you update the theme you’re using only the parent theme will be updated. Your child theme, and everything you’ve coded in it, remains intact.
Easy to restore
Working with source code can be unpredictable at some times. Crashing your blog is a lot easier than you might think.
Of course, in such a case you’re very likely to find the cause of the problems among those few last lines of code you’ve created, but not always. Sometimes a change made somewhere else interferes with other functions and hacks.
If you find yourself in such a situation then removing all the modifications can be very time-consuming. You’d have to go through each file and bring back its old implementation.
Not with a child theme you don’t. Just get rid of the files causing trouble and your blog is back.
This is something We don’t say very often, but We don’t actually see any downside to using child themes. They really are THE way of modifying any theme.
How to use child themes
From a user’s perspective, using child themes is no different from using standard themes. You just go to your WordPress admin, navigate to Appearance > Themes and set your child theme as Active.
Then you can work with the theme normally, as you would with any other theme. You can add widgets to sidebars, create menus, and things like that.