Support » How-To and Troubleshooting » Adding header via include file to my wordpress home page

Adding header via include file to my wordpress home page

Viewing 6 replies - 1 through 6 (of 6 total)
  • Moderator keesiemeijer


    Consider creating a child theme first, instead of editing your theme directly – if you upgrade the theme all your modifications will be lost. Or download one here: http://quirm.net/themes/twenty-twelve-child/

    Copy the header.php file from Twenty Twelve to your child theme and add your header bar HTML there. You probably need to add the style rules for the header bar to your child theme’s stylesheet style.css as well.

    Okay thanks 🙂 I’ve done that now, but instead of just including the parent style.css I just copied everything below the header. Is that cool?

    Edit: Actually, do you think it’d be a good idea to copy all of the files from the parent folder to the child? There are some things I’d like to change, for example I’d like to rename ‘Home’ to Articles so it’s not confused with the Home in the header bar – but would that be overwritten with an update?

    Moderator keesiemeijer


    I see you’ve created a child theme but can’t see the changes to header.php.

    Is that cool?

    Depends if it need javascript. WordPress has it own ways of adding javascript files.

    Moderator keesiemeijer


    You can create your own navigation menu to remove “home”:

    I’ve just added the include’s into the header.php but nothing’s coming up. I have a feeling I’ve tried to get around all of the nested folders wrong in the include line.
    would <?php include(‘/header2.php’); ?> look in htdocs? or would I need to use include(‘../../../../header2.php’);

    the path is currently htdocs/blog/wp-content/themes/twentytwelve-child
    I’m a massive newbie when it comes to php 😀

    Edit: I think if I could find out how/where the template includes all of the php/css files I could figure out how to change everything, but at the minute it’s baffling me haha.

    I’ve tried adding the line include(‘/htdocs/header.php’); in the template’s header.php and it’s not working. I’ve tried it in page.php and index.php but they don’t work either. It’s supposed to make a green bar appear at the top of the page like on the rest of the site, it’s really frustrating haha

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Adding header via include file to my wordpress home page’ is closed to new replies.
Skip to toolbar