I have a client with 4 very specific areas of service and they want so show the service name under the site logo but only the pages related to that service. E.G. the Real Estate page and ALL of its child pages will have “REAL ESTATE” appear beneath the site logo. There are four different services currently. Some pages will be generic (Contact, About, etc) which will not need this treatment.

How do I accomplish this? I don’t need to replace the site tagline specifically, but that’s the best description for where this text should visually appear. (could also be the page header, as the background colors are the same) Thank you.

1 Answer 1


If I understand the question, you'd like the code to detect the service area that the page is addressing, and place in the relevant tagline/phrase under the logo, on that page.

Presuming you are able to modify the php code for the page header template section that displays the logo and tagline, you could set up code to echo the desired tagline under the logo, dependent on some variable.

One way to do this would be to define a custom field in the site's pages named, say, service_area, and give this field the value of 'real estate' or 'retail' etc. Then, before the tagline, in the template, do a callback to capture the value of the service_area custom field for that page.

With that service_area value, a php switch function would define the tagline, dependent on the service_area value, the default being the default tagline for the site.

Perhaps, even simpler, the custom field (service_area in this example) value, itself, could be the tagline. If the value is empty or null, the tagline reverts to the default tagline for the site.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.