Support » Plugins » [Plugin: Google XML Sitemaps] Custom taxonomy term URLs are incorrect

  • Resolved mpclark


    I’m using the Google XML Sitemaps plugin, version 3.2.4

    I’ve noticed tonight that pages for terms in my custom taxonomies are appearing in the sitemap in a strange format.

    I’m pretty sure they used to be:


    …which I regard as the correct, desired result. But now they are appearing in the sitemap as:


    What’s worse is that URLs in this form just resolve to the front page on my site.

    I’ve just upgraded to WP3.1, so I guess it’s possible the problem might be related to that.

    Has anyone else noticed any problems with custom taxonomies in XML Sitemaps?

Viewing 6 replies - 1 through 6 (of 6 total)
  • OK, found the plugin’s debug log. The problem seems to be related to this:

    Notice: Undefined property: stdClass::$taxonomy in /var/www/[domain]/wp-includes/taxonomy.php on line 2837

    And it looks like the funny links are coming from line 2848 of that same file.

    But I’m not good enough at PHP to follow the code and debug it further 🙁

    Is nobody else seeing this issue?

    In case anyone else has trouble, I’ve fixed this by moving to version 4.0beta4, which works fine.

    Hi mpclark
    I don’t know how to add custom taxonomy to my sitemap, which currenty display only the categories. i have a bunch of taxonomies which i need to add help me out.

    I have same problem can some on help me to show in sitemaps links

    Like: mysite/taxonomy/name and not



    I found the cause of this problem.

    -bash-3.2$ diff --unified=0 --strip-trailing-cr sitemap-core.php
    --- sitemap-core.php    2011-09-30 00:41:19.000000000 +0900
    +++     2011-10-28 20:33:26.000000000 +0900
    @@ -2126,2 +2126,2 @@
    -                                               tt.taxonomy AS _taxonomy,
    -                                               UNIX_TIMESTAMP(MAX(post_date_gmt)) as _mod_date
    +                                               tt.taxonomy AS taxonomy,
    +                                               UNIX_TIMESTAMP(MAX(post_date_gmt)) as mod_date
    @@ -2148 +2148 @@
    -                                       $this->AddUrl(get_term_link($term,$term->_taxonomy),$term->_mod_date ,$this->GetOption("cf_tags"),$this->GetOption("pr_tags"));
    +                                       $this->AddUrl(get_term_link($term,$term->taxonomy),$term->mod_date ,$this->GetOption("cf_tags"),$this->GetOption("pr_tags"));

    Please check this code.
    and, Someone who contact the author if you know.
    (I couldn’t find contact form for the author)

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Plugin: Google XML Sitemaps] Custom taxonomy term URLs are incorrect’ is closed to new replies.