Overview of all products. Overview of HubSpot's free tools. Marketing automation software.
Why You Should Use WordPress Child Themes
Methods of Customizing WordPress
To understand how child themes work it is first important to understand the relationship between parent and child themes. A parent theme is a complete theme which includes all of the required WordPress template files and assets for the theme to work. All themes — excluding child themes — are considered parent themes. As indicated in the overview, a child theme inherits the look and feel of the parent theme and all of its functions, but can be used to make modifications to any part of the theme. The directory needs a name. For example, if you were making a child theme of twentyfifteen , then the directory would be named twentyfifteen-child. Your stylesheet must contain the below required header comment at the very top of the file. This tells WordPress basic info about the theme, including the fact that it is a child theme with a particular parent. Expand full source code Collapse full source code. Add remaining information as applicable.
Subscribe to Our Blog
But now, you decide you need to customize it. You can either find a plugin that will provide the customization you need or switch to a new theme. And best practices say: you do that via WordPress child themes. Customizing a theme comes with risks. If you edit the code in a third-party theme which is one you bought off of a marketplace for example , then when you next update the theme, all your changes will be lost. Meaning that not only does your site revert back to the way it was, but all of your work is wasted.
The WordPress platform is a magnet for those who want to take matters into their own hands, who want complete control over their websites and want to be independent in running them. WordPress does make it really easily to completely customize a website. I mean, just compare the default themes, Twenty Fifteen and Twenty Fourteen. Therefore, it is only natural for you to want to adapt the look of your website to fit your vision. However, a problem arises. When trying to make changes to a website, a staggering number of people opt to edit their theme directly.