WordPress.org

Support

Support » Plugins and Hacks » Yoast SEO » [Resolved] Custom Taxonomies and XML Sitemaps doesn't work

[Resolved] Custom Taxonomies and XML Sitemaps doesn't work

  • In all my custom taxonomies have this selected: Use default (Currently: index) and include in sitemap: “discover automatic”.

    In class-sitemaps.php line 464 (SEO plugin version 1.3.1.1) I have to remove these lines:

    if ( wpseo_get_term_meta( $c, $c->taxonomy, 'noindex' )
    				&& wpseo_get_term_meta( $c, $c->taxonomy, 'sitemap_include' ) != 'always'
    			)
    				continue;

    If I don’t do this, my custom taxonomies will not appear in the sitemap.

    http://wordpress.org/extend/plugins/wordpress-seo/

Viewing 5 replies - 1 through 5 (of 5 total)
  • WordPress version: 3.4.2
    WordPress SEO version: 1.3.1.1

    I did this: Using default settings

    I expected the plugin to do this: put custom taxonomies in sitemap

    Instead it did this: returns 404

    Upgraded to SEO version 1.3.2, same problem:

    wpseo_get_term_meta( $c, $c->taxonomy, ‘sitemap_include’ ) returns ‘-‘. This seems to be the default value.

    When changing the following code from class-sitemaps (now line 478):

    if ( wpseo_get_term_meta( $c, $c->taxonomy, 'noindex' )
    				&& wpseo_get_term_meta( $c, $c->taxonomy, 'sitemap_include' ) != 'always'
    			)
    				continue;

    into

    if ( wpseo_get_term_meta( $c, $c->taxonomy, 'noindex' )
    				&& (wpseo_get_term_meta( $c, $c->taxonomy, 'sitemap_include' ) != 'always' && wpseo_get_term_meta( $c, $c->taxonomy, 'sitemap_include' ) != '-')
    			)
    				continue;

    The everything is working again. I hope that it is possible to add this to a future version. Thank you.

    Plugin Author Joost de Valk

    @joostdevalk

    Any chance you could try the development version and see if that works for you? Just made a change for this 🙂

    You can download the development version from here, or you can download it directly here.

    Working. Thank you.

    Plugin Author Joost de Valk

    @joostdevalk

    Awesome.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Resolved] Custom Taxonomies and XML Sitemaps doesn't work’ is closed to new replies.
Skip to toolbar