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 badge2 Answers
Reset to default 0This 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
版权声明:本文标题:php - How to Change Site Elements based on referring URL 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736820114a1954248.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论