Here is an easy was to keep your custom edits to the theme php files.
We need to create a child theme that uses the garland core files for the main theme functions as well as and custom code you add, then when you update the theme from within wordpress only the parent theme will get changed, your child theme will remain intact!
first off we create a new folder within the themes dir and give it a name, inside it we put a style.css file. Ive chosen garland-redux for this example as were protecting my garland theme from changes…we still need the original garland-revisited theme folder, so dont go deleting it!
so your directory path will look like this:
wp-content
|_themes
|_garland-revisited
|_garland-redux
|_style.css
The format for the style.css file is simple, it just tells the child theme where the parent is:
/*
Theme Name: Garland-redux
Theme URI: http://www.pross.org.uk
Description: Testing WordPress Child Themes
Author: Simon Prosser
Author URI:http://www.pross.org.uk
Template: garland-revisited
Version: 1.0
.
This work, like WordPress, is released under GNU General Public License, version 2 (GPL).
http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
.
*/
@import url('../garland-revisited/style.css');
Now go back to the thmes menu of your dashboard and there will be a new theme there ![]()
Now you can start customizing! Lets say for example you wanted to edit the header.php. First copy the original header.php from the garland-revisited parent folder and upload it into your fresh child folder, now you can edit it and your changes will never be lost!
DONT make a blank header.php file in the child folder and simply add your changes to it, it WILL override the file from the parent, you have to copy first then edit.
Good Luck!!
Here are some handy links:
the garland-revisited support post: http://www.pross.org.uk/389/garland-revisited-wordpress-theme.html
Template-override: http://wordpress.org/extend/plugins/template-overide/
Popularity: 5% [?]
A flexible, three-column theme with customizable colors.