简体   繁体   中英

Change wordpress theme based on URL

I posted this question 2 days ago. What I wanted to do was to run 2 WordPress sites having different theme on the same database. I was advised that it couldn't be done and that I should replicate and use the same database for each.

However, I was wondering if there's any way I could change the theme based on the URL being accessed,

Something like this,

if (URL == "one.site.com") {
   LoadThemeOne();
}
else if (URL == "two.site.com") {
   LoadThemeTwo();
}

I appreciate any help, Thanks.

Sure it can be done. In fact, it's pretty easy if you use the Jonradio Multiple Themes plugin.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM