permalinks converted to those domain based !


pls note below improvement of sitemap generarion.

Because of domains mapped on main main blog where a blog have HIS own domain mapped the sitemap should be generated with a permalink refer to that domain and not a subdirectory.

here is an excample

suppose is main domain host the wp mu

and without a mapped domain the permalinks will be and so on. thats is ok

BUT if a domain is mapped on that blog1, suppose so the permalinks should be

unable to find a wp get_permalink function domain mapped ‘aware’, the simple-sitemaps.php has been changed in this way (feel free to update your code without quote the author)

under the var totalposts note added code:

class Incsub_SimpleSitemaps {

var $totalposts = 50; // Number of posts to display

private $map_domain_blog_url, $blog_url;

function __construct() {

global $wpdb;

$this->map_domain_blog_url = “http://” . $wpdb->get_var( “SELECT domain FROM {$wpdb->dmtable} WHERE blog_id = ‘{$wpdb->blogid}'” ) . “/”;

$this->blog_url = get_blogaddress_by_id($wpdb->blogid);


then added code before writefile function:

// Convert main blog based permalink to domain mapped permalink

function get_permalink_dom( $id ){

global $wpdb;

$plink = get_permalink( $id );

$plink = $this->map_domain_blog_url . substr($plink, $this->strlen(blog_url));

return $plink;


then simply replace get_permalink calls in your code with $this->get_permalink_dom( $post->ID )

And now, each domain blog based sitemap, have inside links based on that domain !!!

many thanks!

any subscription extension if granted, will be appreciated. or use the code updateding your plugin and reflect on each other use non domain based links. where personally hided to search engines. because any blogs should expose only its own domain based links…