Support » Plugin: Google XML Sitemaps » [Plugin: Google XML Sitemaps] Google XML Generator w/ Multisite Support Only Produce Map for Main Si

Viewing 3 replies - 1 through 3 (of 3 total)
  • Multisite was designed to host separate sites, so each site having its own site map makes sense. That said, my organization is using multisite to separate access control, so we need a unified sitemap as well.

    I extended the 4.0b4 version to output an index that points to all the site indexes, but Google won’t allow an index to point to another index.

    Option 1 is to include all the sitemaps in robots.txt
    Option 2 is to make a script that consolidates all the sitemaps into one index

    Hopefully arnee will consider integrating something like this.

    I rewrote the DoRobots() method in sitemap-core.php to list all our sitemaps in the robots.txt “file”:

    public function DoRobots() {
            $this->Initate();
            if($this->GetOption('b_robots') === true) {
    
                //$smUrl = $this->GetXmlUrl();
    
                //echo  "\nSitemap: " . $smUrl . "\n";
    
                $blogs = get_blog_list(0, 'all');
                foreach ($blogs as $blog) {
                    $info = get_blog_details($blog['blog_id']);
                    if ($info->deleted || $info->archived) {
                        continue;
                    }
                    $url = 'http://' . $blog['domain'] . $blog['path'] . 'sitemap.xml';
    
                    // allow pre-fetching the sitemaps to initialize the plugin
                    // in each subsite
                    if (0 && isset($_GET['init'])) {
                        file_get_contents($url);
                        usleep(10000);
                    }
                    echo "\nSitemap: $url";
                }
            }
        }

    I hope that this isn’t a dumb question. I have one main site powered by WordPress, http://luvemorleavem.com then I have 3 subsites,/blog, /articles, /relationshipvideos. I am wondering if I can install the plugin on all 4 and then under the option to add pages to the sitemap for my main site I could list all three URL’s for the sitemaps of my three subsites.

    Will that work, or am I way off on this thinking.

    Thanks so much.
    Tina

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: Google XML Sitemaps] Google XML Generator w/ Multisite Support Only Produce Map for Main Si’ is closed to new replies.