August 28, 2012 at 3:43 pm #15787
Hi & thanks again for your help.
I have modified more than just css files for my choices theme. I have added functions and widgets plus I have modified several of the php files and some .js files also. I am now ready to create a child theme but I need to make sure that ALL of my additions and changes don’t get overwritten with future updates.
My questions are:
1) If I copy ALL of the files to my child theme will they override the parent choice’s theme AND not just the css files? (other files like functions.php, assorted js files and other modifications to the framework)
2) Will the “One-Click Child Theme” plugin do all of this for me or just the .css files?
3) Do I need to make any modifications to php files before I do this?
I appreciate your prompt reply!
Thanks, BrentAugust 30, 2012 at 8:46 pm #89003
I don’t know about that plugin, but all you need to do is make a directory next to your theme’s directory and inside have 1 css with a few lines of code:
Theme Name: Twenty Eleven Child
Description: Child theme for the Twenty Eleven theme
Author: Your name here
Just make sure that the Template is the correct name of the parent theme as written in it’s css file. That’s it. Now if you want to replace something from the parent theme, you have to copy that file from the parent and drop it into the child, and WordPress will always first look for every file in the Child folder, and if its not available there, then it will look in the Parent Folder.
So if you want to customize a template that exists in the parent theme, just make a copy , and place it in the child theme in the same sub directory relative to the root as it is located in the original. You can read more here http://www.webdesignerdepot.com/2011/12/ (Purchase code hidden if logged out) -theme/ or http://www.ostraining.com/blog/wordpress/child-theme/
NickAugust 31, 2012 at 8:13 pm #89004
Thanks for your attempt at help but that doesn’t work. I don’t think you followed what I said.
Does someone there fully understand my question? Would you please ask Kriesi?
I have tried that plus more but when I create a child theme the CHOICES theme won’t read my “function.php” file. He’ll understand.
Thank you to someone.
BrentSeptember 1, 2012 at 6:53 am #89005
You don’t have to copy all of the theme files, actually all you need for the theme child to work is style.css file. Try to include this on your child theme functions.php
global $avia_config; $avia_config['use_child_theme_functions_only'] = false;
The original functions.php on the theme will be use plus the added functions.php on the child theme if you are planning to add some. I suggest you put all of the added functionality on the new functions.php in your child theme folder. They will not be overwritten when you upgrade the theme. Just to make sure, create a backup for your theme files and database before updating.
The topic ‘Modifications to php files and creating a new Child Theme for Choices’ is closed to new replies.