Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 12-06-2010, 06:49 PM   PM User | #1
ndwest12
New Coder

 
Join Date: Sep 2009
Posts: 53
Thanks: 4
Thanked 0 Times in 0 Posts
ndwest12 is an unknown quantity at this point
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 06:53 PM..
ndwest12 is offline   Reply With Quote
Old 12-06-2010, 07:37 PM   PM User | #2
ndwest12
New Coder

 
Join Date: Sep 2009
Posts: 53
Thanks: 4
Thanked 0 Times in 0 Posts
ndwest12 is an unknown quantity at this point
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
ndwest12 is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 01:14 AM.


Advertisement
Log in to turn off these ads.