<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Swebi Net &#187; wordpress</title>
	<atom:link href="http://www.saxon4u.com/tag/wordpress/feed" rel="self" type="application/rss+xml" />
	<link>http://www.saxon4u.com</link>
	<description>Per Ardua Ad Astra</description>
	<lastBuildDate>Sat, 03 Dec 2011 10:12:41 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>WordPress Multi (parked) Domains</title>
		<link>http://www.saxon4u.com/95/wordpress-multi-parked-domains</link>
		<comments>http://www.saxon4u.com/95/wordpress-multi-parked-domains#comments</comments>
		<pubDate>Fri, 12 Feb 2010 23:43:25 +0000</pubDate>
		<dc:creator>Peter Saxon</dc:creator>
				<category><![CDATA[Web Design]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[multi domain]]></category>
		<category><![CDATA[parked domains]]></category>
		<category><![CDATA[swebi]]></category>
		<category><![CDATA[template]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://saxon4u.com/wp/?p=95</guid>
		<description><![CDATA[You can find a few plugins to do this, but it really isn&#8217;t necessary . You can simply add a couple of lines of code to your header template, as I have done on this site. To see it in action, just try changing your &#8220;Location&#8221;  above&#8230;&#8230; This first bit of code can be put [...]]]></description>
			<content:encoded><![CDATA[<p>You can find a few plugins to do this, but it really isn&#8217;t necessary .</p>
<p>You can simply add a couple of lines of code to your header template, as I have done on this site.</p>
<p>To see it in action, just try changing your &#8220;Location&#8221;  above&#8230;&#8230;</p>
<p>This first bit of code can be put between the &lt;head&gt;   &lt;/head&gt;</p>
<p>The code:</p>
<blockquote><p>&lt;?php global $title, $desc, $key;<br />
$hosts = array( &#8220;saxon4u.com&#8221;,&#8221;saxon.im&#8221;,&#8221;saxons.us&#8221;);<br />
$theurl = str_replace(&#8220;<a href="http://www.&quot;,&quot;&quot;,$_SERVER['HTTP_HOST'">www.&#8221;,&#8221;",$_SERVER['HTTP_HOST'</a>]);<br />
$key = array_search($theurl, $hosts);<br />
$title = array( get_bloginfo(),&#8221;Saxon For You &#8221;,&#8221;Saxon Int Media&#8221;,&#8221;Saxon Web USA&#8221;);<br />
$desc = array( get_bloginfo(&#8216;description&#8217;),&#8221;The Best Media Company &#8221;,&#8221;America&#8217;s Best&#8221;);<br />
 ?&gt;</p></blockquote>
<p>Explanation of the lines:</p>
<ol>
<li> Declares Globals &#8211; so the variables can passed to all your pages and posts.</li>
<li>Create an array of your domain names.</li>
<li>Get the current domain name ( removing www if present ).</li>
<li>Get the current domain name $key value.</li>
<li>Create a title array  (I have set the first value as the default blog title).</li>
<li>Create a description array (I have set the first value as the default blog description).</li>
</ol>
<p>Now in the &lt;body&gt; just replace the title with:</p>
<blockquote><p>&lt;?php echo $title[$key]; ?&gt;</p></blockquote>
<p>and the description with:</p>
<blockquote><p>&lt;?php echo $desc[$key]; ?&gt;</p></blockquote>
<p>Now for the menu / navigation:</p>
<p>Just replace the &lt;?php wp_list_pages(&#8216;title_li=&amp;depth=1&#8242;); ?&gt; with:</p>
<blockquote><p>&lt;?php<br />
$pages = get_pages(&#8216;sort_column=menu_order&#8217;);<br />
foreach ($pages as $pagg) {<br />
 $paggg = get_page_link($pagg-&gt;ID);<br />
 $addr = str_replace(get_option(&#8216;home&#8217;), &#8220;<a href="http://&quot;.$theurl">http://&#8221;.$theurl</a>, $paggg);<br />
 echo &#8220;&lt;li&gt;&lt;a href=\&#8221;$addr\&#8221;&gt;$pagg-&gt;post_title&lt;/a&gt;&lt;/li&gt;&#8221;;<br />
} ?&gt;</p></blockquote>
<p>You can add as many arrays as you like, but don&#8217;t forget to add them the the global (first line) if you want to use them throughout your website.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.saxon4u.com/95/wordpress-multi-parked-domains/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

