Child theme – copying header.php – what to keep?
-
Hi,
Might be a simple question for people here but can’t seem to find a straight answer around.I’ve modified the ‘header.php’ file to add a link, created a child theme and copied over the ‘header.php’ file into that folder – everything working OK.
How much of the ‘header.php’ file to I need to keep, ie. can I just delete everything but the change that and the related function that I put in, ie. “<?php
if ( true === $show_header_social_icons ) {
get_template_part( ‘includes/social_icons’, ‘header’ );
} ?>
<span class=”custom-link”>Contact Us</span>
;
and save it as the new ‘header.php’ file in the child theme folder;Or do I need everything up to the start of the body tags, then the function & closing tags?
What I want to ensure is that when wordpress & the theme are updated the updates apply to items in the header as well without affecting my modification.
Any help appreciated,
Thanks,
Ken
The topic ‘Child theme – copying header.php – what to keep?’ is closed to new replies.