• alansod

    (@alansod)


    Hello, thank you for reading my question.

    I want to create one WordPress website with the possibility of changing the logo in the header depending on the subdomain.

    So, for example, I have a WordPress site on the domain myshop.nl
    When I go, for instance, to the subdomain yellow.myshop.nl, I want the name and logo to be changed in the header.

    When I go, for example, to the subdomain green.myshop.nl, I want the name and logo to be changed again in the header.

    So every subdomain needs another name and logo, but I want to use only one WordPress installation.

    Is this possible?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Sébastien SERRE

    (@sebastienserre)

    Hello,

    That doesn’t sound really doable because WordPress will be installed on a domain myshop.nl so yellow.myshop.nl will be another website with another WordPress installation.

    The only solution is creating a WordPress multisite and then create a parent theme and a child theme per subsite to match your design needs.

    Create A Network

    Moderator bcworkz

    (@bcworkz)

    It is possible to have various subdomains point to the same installations. It’s not commonly done, but it’s possible AFAIK. You could get the requested subdomain out of the $_SERVER data, then conditionally do one thing or the other based on the request. You could alter the header template code to do this.

    This is feasible if you’re just changing a logo or something minimal. For extensive variations based on requested domain, you’re probably better off with multi-site like Sébastien suggests. But if your multiple sites are limited to 2 or 3 variants, you might consider 2 or 3 completely independent WP sites instead of multi-site. Multi-site brings with it a few drawbacks you can avoid with multiple independent installations. But at more than 3 it’s worth suffering the drawbacks. IMO of course.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to create a changing header with subdomains’ is closed to new replies.