Modify PHP in child theme?
-
Hello!
Well, I’m trying to change some piece of PHP code, but I’m having some problems. I’m trying to change the “home” link to something else basically. This is the piece of code, found in functions.php:
function twentytwelve_page_menu_args( $args ) { if ( ! isset( $args['show_home'] ) ) $args['show_home'] = true; return $args; }I am trying to do it the correct way, so I created another functions.php file in my child theme, and I pasted the code above in there (with <?php and ?> at the beginning and at the end of the file). But sadly, it won’t work… all pages turn blank.
I’ve tried it with a different code, the one found under this page under the functions.php paragraph. I used the piece of code for the favicon to test it, and it worked — I have a favicon now.
Why does the other one not work? I first supposed it is because the piece of code for the favicon isn’t found in functions.php in the first place, and so they don’t “clash”, but I thought you should’t modify any of the parent themes?
All help much appreciated 🙂
The topic ‘Modify PHP in child theme?’ is closed to new replies.