• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Should you ever edit header.php in Child Themes?

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › General Discussion › Should you ever edit header.php in Child Themes?

This topic is: not resolved

Tagged: functions, header.php

  • This topic has 4 replies, 3 voices, and was last updated 11 years, 4 months ago by David Chu.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • February 19, 2014 at 5:56 pm #91296
    georgef
    Member

    I just hired a developer to make changes to my theme.

    He sent me a screen shot of him making changes to the header.php file of my child theme which made my stomach twist..

    He said he is a Genesis expert and that is what he does.. I said no way that goes in the functions file.

    So before I cancel my contract with this guy, am I overreacting or no?

    Would you make changes to the header.php file of your child theme?

    February 19, 2014 at 7:35 pm #91310
    David Chu
    Participant

    Hi,
    That's an interesting question. You both are right, in a way.

    I am more like you. I will put my goodies in function files - then my custom themes consist of just a handful of files in the child theme. It's lean, mean, and very clean. Hooks and filters, baby! Once I was asked to work on a site that had Genesis, but the dev had used no Genesis features at all, just made a mountain of template files.

    BUT - there are those who prefer editing templates. I've noticed that these people often have done WP for awhile, and they are used to doing things this way. Their way can work, and it's easier to start that way if you're experienced in WP, but don't know the Genesis hooks. It's 6 of one, a half-dozen of the other. Every so often you get one of them showing up and whining about how Genesis does things. ๐Ÿ™‚ To me, someone like this will generally be happier developing with something like _s. After all, why use Genesis if you will ignore all of its features?

    So I can't say conclusively that one of you is right without examining the code.

    Conversely, I've seen people who started with Genesis, so they know how it works, but they don't know normal WP hooks! ๐Ÿ™‚

    Dave


    Dave Chu ยท Custom WordPress Developer – likes collaborating with Designers

    February 19, 2014 at 8:11 pm #91316
    dreamdancer
    Participant

    I used to edit the header.php and footer.php to add extra divs to my themes. It works, but I really wanted to do better, I spent hours in tutorials and here on the support board to learn how to add divs in function.php. I still have a couple of themes that I coded the old way and they are running the latest of everything, plus WooCommerce. So it isn't going to do any harm, however, I personally think it is best to do it right and code cleanly.

    And I agree, it depends on what code in the header.php is getting changed and if your theme had it changed in the first place. Don't break what is fixed and all that.

    February 20, 2014 at 12:18 am #91341
    georgef
    Member

    Thanks for the input guys.

    I think it was just the last straw..

    When you hire someone who says he has been working with Genesis for 8 years, charges a premium rate and I had to point out all the little errors happening on his design work, then goes and edits the header.php file just said to me his obviously not the expert he says he is.

    It's also Javascript now I don't know if that makes a difference having it in the header.php file?

    It was that and a search function

    February 20, 2014 at 8:12 am #91370
    David Chu
    Participant

    In very rare cases, it might be truly necessary to edit header.php. I've never needed to using Genesis. Javascript could be legitimately loaded in header.php, but gee, that can easily be done using wp_enqueue_script, you don't even need any Genesis code for that.

    Here's a random thought - PHP coders don't necessarily handle CSS well. They are not the same skill at all. So that may be why you're seeing design weirdness. Again, I can't see details, so I'm speculating.

    Good luck!


    Dave Chu ยท Custom WordPress Developer – likes collaborating with Designers

  • Author
    Posts
Viewing 5 posts - 1 through 5 (of 5 total)
  • The forum ‘General Discussion’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2025 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble