Child Theme – Using functions.php to override template php files
-
Wrapping my head around child themes.
I get that a template in a child theme will overwrite a template in the parent theme.
Ex:child/header.phpwill overwriteparent/header.phpI want to add a function (my-function) to
header.php. It seems a waste to duplicate the entireheader.phpfile to the child from the parent.I’ve read many threads that say the
functions.phpfile in the child theme can amend functions in the parent theme.Is it possible to add (my-function) to
functions.phpin the child theme, and have it added toheader.phpof the parent theme?
Ex:child/functions.php(my-function)is amended toparent/header.phpThanks
The topic ‘Child Theme – Using functions.php to override template php files’ is closed to new replies.