Adding human readable Google sitemap
This aims to describe the steps in getting a human readable Google sitemap into the Wordpress blogging system. First of all, download the google sitemap generator plugin.
Open up the php file, look for line 1100 for this line
$s.="<!-- sitemap-generator-url=\"http://www.arnebrachhold.de\" sitemap-generator-version=\"2.7.1\" -->\n"; |
Add the following line after it.
$s.="<?xml-stylesheet type=\"text/xsl\" href=\"gss.xsl\"?>\n"; |
Now save the file, upload and activate it.
Make a sitemap.xml file on the blog root and make it writable.
Download the gss.xsl stylesheet to display the xml file. Read more about the style sheet here.
Save it to the same location as your sitemap.
Now, edit the .htaccess file and add at the bottom the following:
AddType application/xml .xsl |
Now the stylesheet can can be viewed when it is opened. So you can just add it to your page as a regular link. I put mine in the sidebar. The sitemap can be read by humans and google bots now!
[...] Make your sitemap human readable (http://blog.leion.net/2006/06/02/adding-human-readable-google-sitemap/) [edit] [...]
July 16th, 2006 at 12:18 pmhi, is this mod compatible with the latest sitemap version?
September 3rd, 2006 at 2:26 amThis mod changes the layout file so that the presentation is different. Hence This should be compatiable with the latest sitemap version
September 3rd, 2006 at 3:04 amThanks for this link, I have now added it to the sitemap generation code for Wordpress. One change, however, I am using the latest beta version, so you need to add the following code (rather than your code detailed above) $this->AddElement(new GoogleSitemapGeneratorXmlEntry('<?xml-stylesheet type="text/xsl" xhref="gss.xsl"?>')); Which should come just after line 1530 now. Thanks again for a great link. Dominic.
September 13th, 2006 at 4:45 pmThanks for the update. For some reasons, the version 3 do not work for me.
September 16th, 2006 at 4:06 pmCool thanks for the info dude! it will come in handy.
October 28th, 2006 at 7:38 amThe line Dominic suggested didn't work for me until I changed 'xhref="gss.xsl" mce_href="gss.xsl"' to 'href="gss.xsl" mce_href="gss.xsl"' I'm now using google sitemap generator plugin v3, and the formatting from SourceForge and put it together as a zip at http://thatsnowsthegoat.com/index.php/archive/google-and-human-readable-sitemap/ Both versions 1.4 and 1.5a are available.
November 14th, 2006 at 6:55 amI have a question - how do you establish a sitemap google can find if you have your site setup to handle all page requests not in the database to a set page, like redirect back to the main domain - if you dont have that page in the database. is it possible to put your sitemap somewhere else and have google use it - like in an IP accessed ftp or on another domain? Thoughts?
November 18th, 2006 at 3:25 amFirst of all, the google sitemap file should be located at the root of your site if you have many many sub domains that you want to add in. Pages from other domains will not be able to reported in it. These pages need extra sitemap files. For pages in your domain that is not in the database, you can add them in the google sitemap generator to have them included in the sitemap.
November 18th, 2006 at 11:13 am[...] Make your sitemap human readable (http://blog.leion.net/2006/06/02/adding-human-readable-google-sitemap/) [...]
November 18th, 2006 at 1:45 pmExcellent article
November 22nd, 2006 at 4:09 amI don;t get coment #10 is it spam??
November 22nd, 2006 at 6:37 am[...] is that the sitemap (in the sidebar too) is pretty well human readable and searchable via this tool. tb - possibly related posts-Installed Search Everything Plugin-Installed Adhesive [...]
March 6th, 2007 at 7:20 pmI’ve used Google sitemaps on a few sites now and each time it’s had an adverse effect on my rankings. Has anyone else experienced this?
March 7th, 2007 at 11:35 pmGoogle has been bringing in traffic for me. I think this is because I have the sitemap
March 8th, 2007 at 12:00 am[...] Make your sitemap human readable [...]
May 10th, 2007 at 1:51 am[...] Make your sitemap human readable [...]
June 5th, 2008 at 10:52 am