• Hi,

    I’m familiar with safeguarding edits to the style.css through a Child Theme.

    But I’m not sure about doing the same with the header.php or other files.

    For one site I Managed to just create a full copy of the header.php within my child theme, but that methodology’s pretty faulty I guess.

    I mean, aside from keeping a long stream of notes as to what changes I may have made to what file in case of theme updates…what IS the Standard? Someone please educate me.

    btw, while I’m at it. Is the functions.php a file that plays in the above? or is that just dependent on the particular theme?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    For any PHP file you want to modify copy it from the actual theme and paste it into your Child Theme directory.

    If you want to modify the functions.php file you’ll need to create a fresh functions.php file in your Child Theme. You can’t copy it across.

    Thread Starter lcerura

    (@lcerura)

    Thanks for the quick reply Andrew.

    So it’s as I mentioned above? Copying the header.php completely to my Child Theme Directory and making edits there.

    BUT, if future updates entail edits to the Header.php then I guess it’s on me and my notes to keep track of what I’ve done?…or am I misunderstanding the concept a bit?

    Updating the theme does not modify files in the child theme – that’s the point of a child theme :).

    Thread Starter lcerura

    (@lcerura)

    No, that I know.

    I was referring to changes in, Let’s say, the Header.php

    What if there were important changes to sections which I’d overwritten using the Child Theme? Then It’d be on me to keep track of those changes?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Standards for edits to Header.php and other files via Child Theme(s)?’ is closed to new replies.