Using Child Themes for Modifications
Why Child Themes?
Child themes make customizing your theme even easier. Being able to add custom css through the admin panel is great, but what it you need to change more? If you’ve ever edited php files, then you know how hard it can be to upgrade your theme later. Many times, you forgot what you edited and what needs to changed in the new theme. This can lead to lots of frustration and maybe a broken site.
Child themes solve these problems. A WordPress child theme is a theme that inherits the functionality of another theme, called the parent theme, and allows you to modify, or add to, the functionality of that parent theme. By activating a child theme, you ensure that changes you make to the template files are not overwritten when upgrading the main theme. It’s pure genius!
Using Child Themes
Child themes distributed by Theme Trust are blank slates ready for your customizations. The child theme folder contains only two files: a screenshot & a style.css. Any template files that you wish to edit should be copied to your child theme folder. Whatever changes you make will overwrite the files of the parent theme.
Any template files may be overwritten, except functions.php. This can be altered but not overwritten. More information can be found here: http://codex.wordpress.org/Child_Themes#Using_functions.php
Creating a Child Theme
There’s a plugin you can use that will create a child theme from within the WordPress dashboard: http://wordpress.org/extend/plugins/one-click-child-theme/
Example of Usage to Customize the Footer of the Filtered Theme
Here’s an example of changes that are best done using a child theme:
- Copy footer.php from the Filtered theme to your child theme folder.
- Edit the footer.php file that you copied. Changes that you make here overwrite the original footer.php.
- Add the appropriate css to your custom css in the theme admin panel.
- Upload the new files to your site.