Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 273
Vinith Almeida Avatar asked Nov 27 '25 07:11

Vinith Almeida


1 Answers

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

like image 165
Dan Wist Avatar answered Nov 28 '25 21:11

Dan Wist



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!