{"id":3591128,"date":"2013-03-24T01:21:53","date_gmt":"2013-03-24T01:21:53","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/how-switch-theme-per-domain-on-single-install\/"},"modified":"2016-08-20T23:05:15","modified_gmt":"2016-08-20T23:05:15","slug":"how-switch-theme-per-domain-on-single-install","status":"closed","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/how-switch-theme-per-domain-on-single-install\/","title":{"rendered":"How switch theme per domain on single install"},"content":{"rendered":"<p>I have multiple domains, each for language<br \/>\nI use wpml plugin, set for detect language by domain.<\/p>\n<p>My problem is that i want change the theme by domain.<br \/>\nI try adding this lines in wp-config<br \/>\nswitch ( $_SERVER[&#8216;HTTP_HOST&#8217;] )<br \/>\n{<br \/>\n    case &#8216;polishdomain.com&#8217;:<br \/>\n        define( &#8216;WP_DEFAULT_THEME&#8217;, &#8216;grygratis&#8217; );<br \/>\n          define( &#8216;WP_SITEURL&#8217;, &#8216;http:\/\/grygratis.com&#8217; );<br \/>\n           define( &#8216;WP_HOME&#8217;, &#8216;http:\/\/grygratis.com&#8217; );<br \/>\n    break;<br \/>\n    default:<br \/>\n        define( &#8216;WP_DEFAULT_THEME&#8217;, &#8216;blankslate&#8217; );<br \/>\n}<br \/>\nbut not work.<\/p>\n<p>How i can change theme dinamically?<br \/>\nThanks<\/p>\n","protected":false},"template":"","class_list":["post-3591128","topic","type-topic","status-closed","hentry","topic-tag-domain","topic-tag-themes"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/3591128","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/3591128\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=3591128"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}