View Full Version : Need wordpress children to inherit parent header

12-06-2010, 07:49 PM
I'm gonna try to make this as least confusing as I can.

We are working on a site that basically has 3 sections.


Now I had thought I had this all figured out. But I was wrong. I just ran into a brick wall when I realized that posts sharing the same name will share the same header and I don't want that.

Basically homeowners has one header one color, Builders the other etc.

now i'm using the


echo '

Now i need a way to go if the parent is homeowner then child to inherit it...or at least a way to seperate the pages without have to give them different slugs again.

You can see the examples here



I hope this makes a little sense...I jsut want the children and grandchildren to look like the parent page in a simple fashion

I dont know if htere is a way to be more specific in the if(is_page('xxx')){, if i can somehow make it reflect more of the slug like homeowners/roofing?

12-06-2010, 08:37 PM
figured out another way just to define different php files for header instead of if cases. This will work, but leaving it open if anyone has any better sugestions.

I liked the idea of having 1 central location to edit, but hopefully the site wont have any changes to the menu and this will be okay for now