Link to home
Start Free TrialLog in
Avatar of Chris Labbate
Chris LabbateFlag for Canada

asked on

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.

User generated imageUser generated image
Avatar of Tom Beck
Tom Beck
Flag of United States of America image

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.
SOLUTION
Avatar of Scott Fell
Scott Fell
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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.
Avatar of Chris Labbate

ASKER

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?
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.
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.
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.
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.
User generated image
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 ; )
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial