• Resolved Sikka

    (@sikka)


    Just a quick question: Is changing the header information and putting style.css in the child theme’s directory the only step necessary to be sure my child theme won’t be overwritten when I update wordpress?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Assuming these are your only customisations, yes. No WordPress update will touch your child theme.

    Thread Starter Sikka

    (@sikka)

    Hey esmi.

    Thanks! Does that apply to any file within the theme’s folder as well? php files, specifically. I’m not trying to double-post but you might be able to answer this for me (my other topic’s been pushed back several pages):

    Do .php files need to have their header information changed from the default when used in a child theme? I know this was the case with style.css but I can’t seem to find a specific resource on integrating custom versions of the php files into a child theme, particularly regarding the header.

    Thanks again for your help.

    I dont think any update can touch the files you have in your child folder. I put functions.php in my child theme folder to change the default header size in the twenty eleven theme. All i had to do was call it “functions.php” and then put in just the code i wanted. For example

    <?php
    
    	define( 'HEADER_IMAGE_WIDTH', apply_filters( 'twentyeleven_header_image_width', 930 ) );
    	define( 'HEADER_IMAGE_HEIGHT', apply_filters( 'twentyeleven_header_image_height', 200 ) );
    
    ?>

    Thats it. So its just a file with the same name and then just the content you want. The only difference (i think) with the style.css is that you import the css from the other file before adding your code.

    Hope that helped

    Do .php files need to have their header information changed from the default when used in a child theme?

    No. Those header comments are there for the theme dev team – not WordPress itself.

    Thread Starter Sikka

    (@sikka)

    Hey again. Thanks for the answers, Katch and Esmi.

    It took me a while to see this, but apparently windows was adding a .txt extension to my .php files that wasn’t visible on my desktop. It does, however, show up once uploaded to the server, but I was so convinced the problem was in my header that I didn’t see it until now.

    Made the necessary changes, and the files are showing up in my editor now. Thank you for answering my questions!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Changing header the only thing necessary to assure child theme is update-safe?’ is closed to new replies.