For those of you who don't like getting the Google warning,
"All the URLs in your Sitemap have the same priority.":
I have made a little hack that will alter the priority of the first 2 urls in each sitemap. It arbitrarily reduces the priority of the first 2 urls by .1. If your priority is set for .7, then the first 2 urls will have a priority of .6 and the rest will be .7. This will satisfy the google bot and eliminate the warning message.
It is also possible to open up your sitemap files and manually alter a couple of urls. This will also work. But I have mine set up to run daily as an automated task, so do not have this option. So I created a couple of lines of code to handle this for me.
In googlesitemap.php, the following is all original code, except for the part between "// begin kehrli mod:" and "// end kehrli mod". Just find that part of the code and insert the 3 new lines.
PHP Code:
$number++;
$contentXML .= ' <url>' . "\n";
$contentXML .= ' <loc>' . utf8_encode($url['loc']) . '</loc>' . "\n";
if(isset($url['lastmod']) && $url['lastmod'] != '')
$contentXML .= ' <lastmod>' . $this->LastMod($url['lastmod']) . '</lastmod>' . "\n";
if(isset($url['changefreq']) && $url['changefreq'] != '')
$contentXML .= ' <changefreq>' . $url['changefreq'] . '</changefreq>' . "\n";
if(isset($url['priority']) && $url['priority'] != '')
// begin kehrli mod:
if($number < 3)
$contentXML .= ' <priority>' . ($url['priority'] - .1) . '</priority>' . "\n";
else
// end kehrli mod
$contentXML .= ' <priority>' . $url['priority'] . '</priority>' . "\n";
$contentXML .= ' </url>' . "\n";
Bookmarks