How to create a SEO sitemap for Anchor CMS [Fix]

A Post by Jake, posted under Code.

 
How to create a SEO sitemap for Anchor CMS [Fix]

My blog is was running on Anchor CMS, a personal choice over the other, more popular content management systems like Wordpress or Joomla! as I much prefer the simple interface, clean layouts and super light weight setup.

One of the things that Anchor currently doesn't do so well at (there aren't many things) is SEO site maps but after a couple of Google's, I found How to create a SEO sitemap for Anchor CMS a brilliant resource for adding a sitemap to Anchor, thanks @terrillo! If you're adding this to your setup, then you may find a bug with the XML output not being valid, so I though I would add a fix for this.

When adding the code to your site.php file, you will notice the first line (after comment) will look like this:

$sitemap .= '<url>';

If you are getting XML errors, simply change that first line to look like this:

$sitemap .= '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"><url>';

Hope this helps!

 

Copyright © 2015 Jake Bown. All Rights Reserved.