Creating a Child Theme in Wordpress

Working on a series of Websites that are Wordpress driven. I want to create a standard page of Blog Post Links with Thumbnails. I have created the page have gotten the development up here:

http://dtauto.ca/blog/

I am worried (recommended by another developer) that I will loose my changes when I do an Update to my main wordpress php files...

I have attached a screen shot of the theme I am using and the wordpress php structure.

theme files1themes files2
fadercreepAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Tom BeckCommented:
If you intend to change anything in your theme (beyond what you can change through the WP admin interface) then, yes, make a child theme.

Very simple to do. Lots of online tutorials like this one:

http://www.elegantthemes.com/blog/resources/wordpress-child-theme-tutorial

If you only want to change the main styles then you only need a style.css file in the child theme folder. Generally, any file from the parent theme that you want to customize should be copied to the child theme folder. Leave the files in the parent folder untouched. Wordpress will always look in the child theme folder first for the files it needs to build each page.
Scott Fell, EE MVEDeveloper & EE ModeratorCommented:
Creating a child theme is essentially creating a folder

http://codex.wordpress.org/Child_Themes

If your theme name is dtauto, then create a new folder at the same level called dtauto-child.  Then place the following css file in that folder
/*
 Theme Name:   dtauto Child
 Theme URI:    http://dtauto.ca/blog/
 Description:  dtauto Child Theme
 Author:       fadercreep
 Author URI:   http://dtauto.ca/
 Template:     dtauto
 Version:      1.0.0
 License:      GNU General Public License v2 or later
 License URI:  http://www.gnu.org/licenses/gpl-2.0.html
 Tags:         whatever, you, want
 Text Domain:  dtauto-child
*/
/* Place your custom css below */

Open in new window

Once that is up, go to your themes selection in your admin panel and select the child theme to be the current theme.  Your set.  From there, any custom functions etc you can add a functions.php in the same child theme folder and add your custom functions.
Alicia St RoseOwner & Principle Developer/DesignerCommented:
Any files you wish to edit need to be copied from the Parent theme to the child theme and only edit the CHILD THEME'S template files.

Just in case, If you've simply changed the name of your Parent theme to the name of your business, then you need to change it back to it's original name for updating purposes and for the Child Theme Declaration that you will learn about through the links provided in the posts above.
CompTIA Network+

Prepare for the CompTIA Network+ exam by learning how to troubleshoot, configure, and manage both wired and wireless networks.

fadercreepAuthor Commented:
The only thing I have changed is a few lines of code within the editor. I have not changed any of the file names. So my question is this?

1. If I changed the original source files in the editor, do I have to change them back?
2. Then create a child theme and make changes to those files?
Tom BeckCommented:
Deactivate your current theme.
Rename your current theme folder by adding a "-child" like dtauto-child.
Install a fresh copy of the original parent theme.
Add the required theme information to the top of style.css in your child theme, theme name and template are the most important.
Activate the child theme and the changes you made previously will be in effect.
Make any additional changes to the child theme.
Any files you do not intend to modify in your child theme folder can be deleted.
Alicia St RoseOwner & Principle Developer/DesignerCommented:
Question:
Is the original name of your theme dtauto?

It seems odd that your business and theme have the same name. That's why I suspect you changed the name of the parent theme's folder.

If you've done that, then you won't be able to update the Parent theme.

Your parent theme folder must retain it's original name.
fadercreepAuthor Commented:
Problem is I do not know, they fired the last Wordpress developer and I am trying to implement all of their requests. EI Creating an internal Blog, they had an off page one before hosted at wordpress.com

LaughHearty
: You are probably are right they renamed what ever original theme they used as a starting point.

TomBeck: I understand how to create a child theme, for the most part, I have gone through the tutorial. Where I am getting stuck is, "I Do Not have a Fresh Copy of the Original Theme"  Would I ask the old developer for a backup?

thanks guys... working on these sites, cleaning up messes.
Alicia St RoseOwner & Principle Developer/DesignerCommented:
Can you give us a screen shot of you admin Appearance > Themes page?
I might be able to tell you what the original theme was.

If your not able to reach the old dev. You can repurchase the theme or it may have even been a free one from the WordPress Repository. We just need to see the screenshot.jpg. It's image that shows up for the themes in the admin.
fadercreepAuthor Commented:
Themes
sorry guys, Im going to respond a little quicker, I am UBER busy with many contracts, this one is very important to me. thanks again for your help ; )
Alicia St RoseOwner & Principle Developer/DesignerCommented:
Hi fadercreep,
seeing your theme section in the admin and viewing source, it appears that you are dealing with a custom theme and not a child theme of a parent theme.

This means:

1. No need to rename
2. You can edit all and any files disregarding any update because there won't be one!
3. You may want to keep a copy of the theme as is before you edit, though.
4. It's up to your discretion whether you want to make a child theme of this. This would insure that original will remain intact, if you do.

So it appears that you are safe as far as the parent child relationship. ;)

But you posted previously about the thumbnails and your blog posts etc. Which lead me to encourage you to post a new thread concerning the themes.

I want to suggest you start a new thread about the blog and it's discrepancies? For instance, why does the top of your blog page say "Lawn Mower Batteries"?

And the use of a blogroll plugin to get thumbnails. Not sure why or how you are using that. It's not necessary.

Can you post new thread so we can get those issues fixed?
Please post link to new thread here.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
WordPress

From novice to tech pro — start learning today.