WordPress Muti-Domain Update

If you have parked domains, a simple mod to the wp-config.php file can make everything work.

You can find a few plugins to do this, but it really isn’t necessary .

You can simply add a couple of lines of code to the top of your wp-config.php file.

//wp_saxon_multidomain_start
define( 'WP_SITEURL','http://'.$_SERVER['SERVER_NAME'].'/wp' );
define( 'WP_HOME','http://'.$_SERVER['SERVER_NAME'] );
//wp_saxon_multidomain_end

Then – to make sure your links work, set the Permalinks to Custom:

/%post_id%/%postname%

Press Save to save the new permalink structure, and everything should work great.

I have no problems with plugins, this mod works with most plugins without any modification.

Domain Name Special Offer

We have some special domains for sale, “these are hard to get names”  and can yours today, they are really quite desirable. The price is to purchase the domain name, you can then do whatever you want with them, they can be yours for life….

Of course we will get you the name you want, as part of a package with Swebinet…..

www.saxons.us 300 €  o.n.o.
 just perfect for you saxon’s out there, this domain can be yours today !!!!

www.1shot.com 300 €  o.n.o.
This is very unique  one shot – now is that special or what !!!!

www.thefreediver.com 300 € o.n.o.
 Come on you extreme free divers, this will be sold very soon, this is a once in a lifetime opportunity.

www.saxon.im 300 € o.n.o. 
The one true Saxon, again a hard to get domain name.

www.saxonws.com 100 € o.n.o
The  Saxon, again a hard to get domain name.

www.saxonws.co.uk 100 € o.n.o. 
The Saxon for the UK, again a hard to get domain name.

www.youtrees.com 200 €  o.n.o. 
Yew Trees  You -trees tree work gardening etc. don’t miss this ….

www.theyongs.com 100 €   o.n.o. 
The yong ones, yes another dot com domain .

www.bebrave.eu 100 € o.n.o. 
The one true Brave, European domain name.

WordPress Multi (parked) Domains

You can find a few plugins to do this, but it really isn’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 “Location”  above……

This first bit of code can be put between the <head>   </head>

The code:

<?php global $title, $desc, $key;
$hosts = array( “saxon4u.com”,”saxon.im”,”saxons.us”);
$theurl = str_replace(“www.”,””,$_SERVER[‘HTTP_HOST’]);
$key = array_search($theurl, $hosts);
$title = array( get_bloginfo(),”Saxon For You “,”Saxon Int Media”,”Saxon Web USA”);
$desc = array( get_bloginfo(‘description’),”The Best Media Company “,”America’s Best”);
 ?>

Explanation of the lines:

  1.  Declares Globals – so the variables can passed to all your pages and posts.
  2. Create an array of your domain names.
  3. Get the current domain name ( removing www if present ).
  4. Get the current domain name $key value.
  5. Create a title array  (I have set the first value as the default blog title).
  6. Create a description array (I have set the first value as the default blog description).

Now in the <body> just replace the title with:

<?php echo $title[$key]; ?>

and the description with:

<?php echo $desc[$key]; ?>

Now for the menu / navigation:

Just replace the <?php wp_list_pages(‘title_li=&depth=1’); ?> with:

<?php
$pages = get_pages(‘sort_column=menu_order’);
foreach ($pages as $pagg) {
 $paggg = get_page_link($pagg->ID);
 $addr = str_replace(get_option(‘home’), “http://”.$theurl, $paggg);
 echo “<li><a href=\”$addr\”>$pagg->post_title</a></li>”;
} ?>

You can add as many arrays as you like, but don’t forget to add them the the global (first line) if you want to use them throughout your website.