Support » Plugin: Google XML Sitemaps » [Plugin: Google XML Sitemaps] Using XML sitemap to create a geositemap?

  • I am the developer of the mapping plugin and would like to add a geo sitemap in one of the next versions
    Best would be to use your plugin to add the map info to the generated sitemap.xml-file from Google XML site map with the following function:

    function lmm_add_markers_to_sitemap() {
        if (lmm_is_plugin_active('google-sitemap-generator/sitemap.php')){
            $start = round(microtime(true),4);
            global $wpdb;
             $generatorObject = &GoogleSitemapGenerator::GetInstance();
            $markers = $wpdb->get_results("SELECT id FROM '.$table_name_markers.' ORDER BY createdon DESC");
            foreach ($markers as $marker) {
                $georsslink = LEAFLET_PLUGIN_URL . "leaflet-georss.php?marker=" . $marker['id'];
            $end = round(microtime(true),4);

    Unfortunately this is not working as GeoSitemaps require an additional namespace within the <urlset>-tag:
    xmlns:geo=”″ and I would need a function like AddGeoURL()
    which adds the maps to the sitemap like this:


    The output for this function could be triggered by code like this:

    foreach ($markers as $marker) {
                $georsslink = LEAFLET_PLUGIN_URL . "leaflet-georss.php?marker=" . $marker['id'];

    you write in the your post about the beta version, that there is a new API which developers can build upon.
    Is the usecase I am describing above possible with the API?
    Thanks for any help!

  • The topic ‘[Plugin: Google XML Sitemaps] Using XML sitemap to create a geositemap?’ is closed to new replies.