child theme, new functions.php acessing old functions.php
-
I am creating a child theme from sandbox to be able to also incorporate the blueprint css framework. I have most of that working, but when I create a functions.php and do things like inserting some stylesheet links through creating a function to output the right html and then using the add_action to place that in the head, that works fine.
However, when I do the same thing to try to insert the class of ‘container’ into the body tag using the add_filter(‘body_class’, ‘myfunction’) then if I create a function that simply echoes the word ‘container’ it works fine at creating a class=’container’ in the body tag, but all of the class values that sandbox normally generates are simply replaced by this. NOT good.
So, I tried to have the function echo body_class_whatever() . ‘container’ and it all just blows up and I get nothing but a blank page. NOTE: I use the proper function name from the sandbox/functions.php but can not recall it now
I even tried to just copy the functions.php from sandbox and add my changes to it and it still results in the same thing. I even tried passing that function a parameter of false because I saw that doing so would cause it to return the values rather than echo them out.
Not sure how this is supposed to be done. When I create a functions.php in the child theme, it does not appear to replace the parent one because before trying to change the class for the body tag, it created the sandbox version of it even though I had a functions.php file in the child. However, I do not seem to be able to call any of those functions in the original.
It seems to me that I am missing something basic but I can not figure it out. Any and all help is appreciated.
- The topic ‘child theme, new functions.php acessing old functions.php’ is closed to new replies.