Modifying the header in a child theme
-
What is the principled approach to modifying header.php in a child theme?
I am creating a child theme based on the Twenty Sixteen theme. In the Twenty Sixteen theme, the header image appears below the navigation menu, and I want to move the image above the menu. That is, I want to move the
<div class="header-image"></div>
above the<div id="site-header-menu"></div>
in the html generated by header.php.I can copy header.php into my child theme and make the one-line cut-and-paste change to the code there. But you know the next day the revision of the parent theme is going to change header.php and I’ll have to hack my child theme again. Is there a better way to make this change? Some hook I’m forgetting about?
The header.php in the Twenty Sixteen theme is just a block of php code, there is no obvious function in that php to override in the child theme.
- The topic ‘Modifying the header in a child theme’ is closed to new replies.