Magento WordPress Integration XML Sitemap Generation

With Magento WordPress Integration, all of your blog links will be added to your Magento XML sitemap automatically. By default, this includes all of your posts and pages but if you're using the Post Types & Taxonomies add-on extension, all of the links for your custom post types will be added to the Magento XML sitemap as well.

You can manually generate your Magento XML sitemap by logging in to your Magento Admin and select Catalog > Google Sitemap and then clicking the 'Generate' button next to the sitemap that you want to generate. If you do not have any XML sitemap's setup, you will need to do this first (you can find plenty of information on Google about how to setup a Magento XML sitemap).

My Blog Links Aren't Added to the XML Sitemap

If your blog links aren't added to your Magento XML sitemap, first ensure that you have the latest version Magento WordPress Integration installed. Next, you will need to check whether there are any conflicts with other extensions that's stopping Magento WordPress Integration from adding links to the sitemap. To do this, create a file in the root of your Magento installation and add the following PHP code to it.


	require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'app' . DIRECTORY_SEPARATOR . 'Mage.php');

	$sitemapModel = Mage::getModel('sitemap/sitemap');

	if ($sitemapModel instanceof Fishpig_Wordpress_Model_Sitemap_Sitemap) {
		echo '<h1>XML Sitemap Integration Successful</h1><p>Your blog links should be added to your Magento XML sitemap successfully.</p>';
	else if (get_class($sitemapModel) === 'Fishpig_Wordpress_Model_Sitemap_Sitemap') {
		echo '<h1>Upgrade Required</h1>';
		echo '<p>No conflicts were detected but the version of Magento WordPress Integration that you have installed does not support XML sitemap integration. Upgrade Magento WordPress Integration to get this feature.</p>';
	else {
		echo sprintf('<h1>Conflict Detected</h1><p>Your Sitemap model has been extended by %s.</p><p>Remove this extension or consider patching it so that %s extends Fishpig_Wordpress_Model_Sitemap_Sitemap.</p>', get_class($sitemapModel), get_class($sitemapModel));

After saving the file, browse to it in your web browser and the file should tell you whether a conflict exists or not.

Post your comment

FishPig Ltd