We have multiple brands and are wanting to combine them all into one domain.

When a user visits a page that is under a particular brand, we want the logo and URL to change.


https://www.example.com - want the home logo to be "example" and home URL to be "/"

https://www.example.com/brand1/ - want the home logo to be "brand1" and home URL to be "/brand1/"

https://www.example.com/brand2/ - want the home logo to be "brand2" and home URL to be "/brand2/"

Is this possible?

I've looked for a plugin or code to do this and am coming up blank.

Thanks in advance!

  • How your brand is assigned? (By category, page, other?) >>> Second question: the /, /brand1/, /brand2/ are three php template file or you use the index.php/front-page.php for all these urls? – Sam Nov 22 '19 at 16:45
  • With my question "How your brand is assigned?" I would like to add to my example: Is it by multisite? – Sam Nov 22 '19 at 17:35
  • We want to stay away from multisite. The brand is assigned based on the current folder. If the URL contains "/brand2/," we always want the logo to be the "brand2" logo and always want the link when clicking on the logo to be "/brand2/" and not "/" – Sean S Nov 22 '19 at 17:39
  • Okay, if /, /brand1/ and /brand2/ is a page in your admin wordpress, you can use conditional PHP like this if(is_page(33)){//your code if page id is 33} .... So I have a question for you: How /brand1 or /brand2 exist ? Is a page added in your admin? Is a folder you have added in your structure ? Other ? – Sam Nov 22 '19 at 17:44
  • I lied - last time I used Multisite was years ago and we had a very unpleasant experience. This time it is exactly what the doctor ordered! Thanks so much for the suggestion! – Sean S Nov 22 '19 at 18:46

You might want to consider setting things up as a subfolder-based MultiSite. You would then have www.example.com as the top-level site, with www.example.com/brand1 and www.example.com/brand2 subsites where you would be able to set separate logos and navigation.

If separate navigation isn't your goal, i.e. you want it to be easier for people to move between brands, you might instead want to set up a custom post type for each brand. So, you could set up a brand1 CPT where the archive is www.example.com/brand1 and all individual brand pages are in www.example.com/brand1/post-slug and you could then add a conditional in the theme header to swap out the logo if it's that post type.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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