World of Leion

Adding human readable Google sitemap

by on Jun.02, 2006, under Howtos, Technology, Wordpress

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.

NOTE: If you downloaded version 3.1.0.1 or newer, you may skip the steps below. The new version already support the human-readableness out of the box. The information below is applicable only for the older versions.

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!

:

18 Comments for this entry

14 Trackbacks / Pingbacks for this entry

Leave a Reply

Archives