theme-setup.php Child theme changes not overriding
Hello everyone! Although I LOVE LOVE LOVE Graphene and have used it extensively, I am ashamed to say I just started playing with Child themes. Having said that, this question may seem dumb and easy to answer, but I can’t figure it out. One of the first things I usually do to the Graphene theme is change the size of the header area to make it taller. I have always done this by editing the code in the .php files, and in the most recent update, it is now found in the theme-setup.php file. So, tonight I created my child theme, uploaded the files, copied over the entire text from the theme-setup.php file (just in case when I couldn’t make it work) and changed it from 198 to 250. Nothing happened. If I go edit the original one, it changes it. Thoughts, suggestions?
Thanks in advance!!! 🙂
AnonymousMarch 26, 2012 at 9:41 am #26894
You should never copy the entire parent theme file to the child theme. It causes so many problems.
An option to change the header height will be available in Graphene 1.7 update.
I only copied the whole php file over when I couldn’t get it to work – to begin with I only brought the section I needed. Can you explain why it isn’t working though? Is there something different I have to do with the php files to make them override the originals? All of my CSS changes are working, but the PHP doesn’t seem to be. Thanks!
AnonymousMarch 26, 2012 at 6:28 pm #26896
First things first, you shouldn’t have to touch any PHP files in order to customize the look of your site. If your having trouble creating a child theme there is a plugin that will do that for you easily.
Download the plugin and literally click one button to create a full child theme. Your new folder on your ftp will show the new style.css, screenshot, style.rtl.
After that your ready to edit your Child Theme without ever touching the original parent theme.
If you want to do it manually search the forums on how to create a child theme. From there you should only be editing the
style.cssthat is created on the new child theme to customize your site. If you want to add codes on certain PHP files like
functions.phpyou create a new PHP file starting with
?>and putting your codes in between, then saving them as what ever
PHPfile your trying to create then uploading it to your child theme folder. Search the forums for tutorials there’s several.
Most of the Mods here have great sites giving you a step by step tutorials.Mod
If you have a template file in your child theme that has the same name as the parent theme, then only the file in the child theme folder will load, not the file in the parent theme. That explains why you had to copy the entire file (and not just a portion of it) over to your child theme.
Because of this, when you update the theme, the old child theme file will continue to be loaded in place of the parent theme file, and so that file will NOT be updated–causing all sorts of problems.
Use action hooks and custom functions to alter your child theme. Like Prasanna said, variable header height will be available in 1.7. Until then, use this in your child theme’s functions file:
You must be logged in to reply to this topic.