1

I just inherited a site where the creator installed the Copperific Theme and then modified the source files to achieve customizations.

My understanding of custom themes was that, in order to protect your modifications, you cloned the original theme and re-named it, housed it in its own theme folder etc. Is that correct?

My concern is that when WordPress updates are available that customizations might be wiped out by the update process.

Additionally looking at the mod dates of the core WP files shows a variety of dates leading me to assume the original developer edited these as well. Is that a reasonable assumption?

Do I have to upload a copy of WP from that version and diff them to know?

What would best practice dictate for this situation.

No code comments, docs, or notes were left for me...

enter image description here

1
  • 2
    There's a wonderful thing called source version control. I suggest you use it going forward. Since your code is coming from two places (your own modifications and WP's updates), your best course of action would be to perform an update in a testing WP install and then diff it with your non-updated version to see what changed.
    – Kenaniah
    Jan 18, 2012 at 23:56

1 Answer 1

3

In terms of dealing with the old developer's mess... I don't know. But if you want to make a child theme in order to protect your future changes from being wiped out from updates, it's easy:

First create a new folder in wp-content/themes and call it whatever you want. Next create a file: style.css and place the following code at the top:

/*
      Theme Name: Your theme name
      Author: Your Author
      Author URI: Your Author Website
      Template: twentyten
      Version: 1.0
*/

Template: is going to be the name of your parent theme. You can find the official name (it's case sensitive) by looking in the style.css of the parent theme.

That's the minimum you need to setup a child theme, and you can now go to appearance -> themes and should be able to find your theme.

Now you can simply copy the template files from the parent theme into your child theme folder and make the necessary modifications. If a file is present in both child and parent theme, the child theme will override the parent. If a required theme file is missing in the child folder, it will simply use the template from the parent theme.

For more, see: http://codex.wordpress.org/Child_Themes

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.