admin管理员组

文章数量:1134247

I want to create WordPress website that changes branding and theme based on the referring URL. We provide white label services to funeral homes and we want to create a generic site where funeral Customers can choose content and designs with the branding of their funeral home. For example if you visiting genericexamole/funeralhomeA would see Funeral Home A’s logo, colours and options and the same for Funeral Home B. We have a large list of clients so we don’t want to run multiple sites for this aspect.

Thanks!

I want to create WordPress website that changes branding and theme based on the referring URL. We provide white label services to funeral homes and we want to create a generic site where funeral Customers can choose content and designs with the branding of their funeral home. For example if you visiting genericexamole.com/funeralhomeA would see Funeral Home A’s logo, colours and options and the same for Funeral Home B. We have a large list of clients so we don’t want to run multiple sites for this aspect.

Thanks!

Share Improve this question edited Jul 22, 2019 at 11:35 RiddleMeThis 3,7878 gold badges21 silver badges30 bronze badges asked Jul 22, 2019 at 10:48 Justin LerouxJustin Leroux 31 bronze badge
Add a comment  | 

2 Answers 2

Reset to default 0

This is done in WordPress using Page Templates. This allows you to give a unique design for specific pages meeting specific criteria.

There are several methods for assigning page templates to certain pages. Sounds like for you the easiest would be to create templates based off of the page name (or URL).

So for example, if you create a page with the URL funeralhomea you would create a template called page-funeralhomea.php. This page-pageName.php structure tells WordPress to automatically assign this template to a PAGE with that URL.

You can read more about page templates here.

The easiest way to get this setup would be to copy your theme and create a child theme, then from there you can copy your child theme's page.php file, rename it to page-funeralhomea.php and make your changes to it.

More info on creating a child theme.

This is very common WordPress functionality and there are a ton of resources out there, just google "wordpress page templates" or wordpress how to setup child theme" etc.

Good Luck!

Have a look here ... changes css/logo etc based on referring url

Theme / Divi change visitor css and site logo and all site urls based on REQUEST_URI non logged in wp user

本文标签: phpHow to Change Site Elements based on referring URL