Adding header via include file to my wordpress home page

Hey guys this might be a really stupid question, but my whole website uses a header bar and I want to add it to the wordpress page for continuity but as the whole page is /blog I’m not sure what file to add the include line to?

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?

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.