The Google Sitemap Generator WordPress Plugin is the most widely used plugin to generate a sitemap for a wordpress site. However it doesn’t support custom types yet. Hence the Google Bot hasn’t been visiting my website as frequently coz the sitemap doesn’t have the posts I add on my custom microblog. So I modified the plugin to add support for all public non-built-in post types. Here’s the patch.
To apply the patch, go to the folder of the google sitemap generator plugin
ROOTDIR/wp-content/plugins/google-sitemap-generator and execute the below command.
zcat sitemap.patch.gz | patch -p0
Do make sure you specify the correct path for
If you want a more elegant solution, go here. I found it after I wrote the patch :(.
I’m adding it directly to the plugin code, hoping that the next release of the plugin would bring support for custom post types and I won’t have to worry about the patch being overwritten.