• Anonymous User 14393966

    (@anonymized-14393966)


    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.php will overwrite parent/header.php

    I want to add a function (my-function) to header.php. It seems a waste to duplicate the entire header.php file to the child from the parent.

    I’ve read many threads that say the functions.php file in the child theme can amend functions in the parent theme.

    Is it possible to add (my-function) to functions.php in the child theme, and have it added to header.php of the parent theme?
    Ex: child/functions.php(my-function) is amended to parent/header.php

    Thanks

  • The topic ‘Child Theme – Using functions.php to override template php files’ is closed to new replies.