Google Sitemap plugin fix
I use Arne’s Sitemap Plugin (http://www.arnebrachhold.de/redir/sitemap-home/) on many of my sites, most of which are mainly posts, not pages. However for a recent project, the site was mostly pages, multiple levels deep.
After getting errors from Google about my sitemap, I found that all the entries for pages had only the pagename in them – none of the parent path info was being included.
After a bunch of debugging, I found that the post_parent attribute was left out of the SQL query in the sitemap plugin. To fix this, I simply added “,
post_parent” to line 1566 of the plugin. Now that the data is retrieved, the WordPress permalink functions work as expected.
So Line 1566 changed from:
[bbPress took out the single quotes from the post – be sure to INCLUDE them so the post_parent part looks like the other fields in the query]
I let Arne know of this simple fix, but figured I’d post it here in case others are wondering why their subpages are failing in their sitemap.xml file when using this plugin.
- The topic ‘Google Sitemap plugin fix’ is closed to new replies.