Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Sep 2009
    Posts
    53
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Need wordpress children to inherit parent header

    I'm gonna try to make this as least confusing as I can.

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

    Homeowners
    Builders/Trades
    Associations...

    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

    Code:
    <?php
    
    if(is_page('Homeowners')){
    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

    http://ecbiz97.inmotionhosting.com/~feherh5/homeowners

    http://ecbiz97.inmotionhosting.com/~...uilders-trades

    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?
    Last edited by ndwest12; 12-06-2010 at 07:53 PM.

  • #2
    New Coder
    Join Date
    Sep 2009
    Posts
    53
    Thanks
    4
    Thanked 0 Times in 0 Posts
    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


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •