WordPress.org

Ready to get started?Download WordPress

Forums

WordPress SEO by Yoast
[resolved] Custom Taxonomies and XML Sitemaps doesn't work (6 posts)

  1. niska
    Member
    Posted 1 year ago #

    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/

  2. niska
    Member
    Posted 1 year ago #

    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

  3. niska
    Member
    Posted 1 year ago #

    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.

  4. Joost de Valk
    Member
    Plugin Author

    Posted 1 year ago #

    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.

  5. niska
    Member
    Posted 1 year ago #

    Working. Thank you.

  6. Joost de Valk
    Member
    Plugin Author

    Posted 1 year ago #

    Awesome.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.