{"id":114235,"date":"2011-10-28T08:00:00","date_gmt":"2011-10-28T08:00:00","guid":{"rendered":"https:\/\/www.weixiaoduo.com\/plugins\/2024\/02\/22\/multidomain\/"},"modified":"2011-10-29T04:50:00","modified_gmt":"2011-10-29T04:50:00","slug":"multidomain","status":"publish","type":"post","link":"https:\/\/www.weixiaoduo.com\/plugins\/multidomain\/","title":{"rendered":"MultiDomain"},"content":{"rendered":"<ul>\n<li>Point multiple domains\/sub-domains at a single WordPress installation and maintain link integrity (i.e. if you\u2019re on http:\/\/foo.com, links will be http:\/\/foo.com\/bar, and if you\u2019re http:\/\/baz.com links will be http:\/\/baz.com\/bar)<\/li>\n<li>Overwrite site title, description, or theme per domain<\/li>\n<li>Customize content per domain using the [MultiDomain_if] and [MultiDomain_else] shortcodes<\/li>\n<\/ul>\n<p>If you need more customization between domains, WordPress MU is a better option.<\/p>\n<h3>Configuration Examples<\/h3>\n<p>Note that you usually won\u2019t need to configure your primary domain \u2014 MultiDomain will automatically fall back to your WordPress defaults if not configuration is present for a domain.<\/p>\n<h4>Basic<\/h4>\n<p>In config.php:<\/p>\n<pre><code><?php\n  $domains = array(\n    array(\n      'domain' => 'myalternatedomain.com',\n      'siteurl' => 'http:\/\/myalternatedomain.com',\n      'home' => 'http:\/\/myalternatedomain.com'\n    )\n  );\n?>\n<\/code><\/pre>\n<h4>More Complex<\/h4>\n<p>In config.php:<\/p>\n<pre><code><?php\n  $domains = array(\n    array(\n      'domain' => 'example1.com',\n      'siteurl' => 'http:\/\/example1.com',\n      'home' => 'http:\/\/example1.com'\n    ),\n    array(\n      'domain' => 'example2.com',\n      'siteurl' => 'http:\/\/example2.com',\n      'home' => 'http:\/\/example2.com',\n      'blogname' => 'Example 2'\n    ),\n    array(\n      'domain' => 'example3.com',\n      'siteurl' => 'http:\/\/example3.com',\n      'home' => 'http:\/\/example3.com',\n      'template' => 'twentyten',\n      'blogname' => 'I have a different name...',\n      'blogdescription' => '..and description'\n    )\n  );\n?><h3>Tag Usage<\/h3>\n<\/code><\/pre>\n<p>The provided short codes let you tailor your content per domain if needed. [MultiDomain_else] and [MultiDomain_default] are identical.<\/p>\n<pre><code>[MultiDomain_if domain=\"example1.com\"]\n  Content only people visiting on example1.com will see.\n[\/MultiDomain_if]\n\n[MultiDomain_else]\n  Content anyone visiting on any other domain will see.\n[\/MultiDomain_else]\n\nNormal content everyone will see.\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Allows multiple domains to be pointed at a single WordPress install with customization for each.<\/p>\n","protected":false},"author":65,"featured_media":310930,"comment_status":"open","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"slim_seo":{"title":"MultiDomain - \u8587\u6653\u6735\u63d2\u4ef6\u76ee\u5f55","description":"Allows multiple domains to be pointed at a single WordPress install with customization for each."},"footnotes":""},"categories":[1],"tags":[2057,2058,31980],"class_list":["post-114235","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","tag-domain","tag-domains","tag-mirroring"],"_links":{"self":[{"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/posts\/114235","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/users\/65"}],"replies":[{"embeddable":true,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/comments?post=114235"}],"version-history":[{"count":0,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/posts\/114235\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/media\/310930"}],"wp:attachment":[{"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/media?parent=114235"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/categories?post=114235"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.weixiaoduo.com\/plugins\/wp-json\/wp\/v2\/tags?post=114235"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}