Viewing 6 replies - 1 through 6 (of 6 total)
  • I know the cause, not the solution though unfortunately. It seems people that use the divi theme have this error in their sitemaps.
    If you come up with a solution please advise.
    thanks

    Hi overcranked!

    We do have a Knowledge Base article at Yoast, on common sitemap issues that you can refer to – http://kb.yoast.com/article/123-xml-sitemap-errors

    Look through and see if any of these pertain to you.

    One of the simplest solutions is re-saving your permalinks under Settings > Permalinks. If that doesn’t work, then try any of the solutions mentioned under the 404 issue.

    Hi Overcranked and tabasco86,

    If you are both using Divi theme, and that is the origin of those terms, then what you want to look at is this:

    http://kb.yoast.com/article/299-how-to-customize-the-sitemap-index#exclude_taxonomy

    There is a code block on that page that you will put into your theme’s functions.php file.

    For each one of the problematic, three, terms, you would replace “taxonomy_slug’ with the term such as layout_type

    When editing PHP, always be sure to make a backup before you proceed, as a single error or typo can temporarily take your site offline.

    If you need additional personalized assistance to help you get this solved we also offer Premium support which you can learn more about at http://kb.yoast.com/article/160-support

    ~ Kim ~
    Support at Yoast

    Hi,

    thanks for the help!

    Hey there

    I do actually have the same problem.

    Could you please tell me how you fixed the problem?

    I’ve added the following code to the function.php file of my CHILD theme.

    function sitemap_exclude_taxonomy( $value, $taxonomy ) {
    if ( ‘layout_type’ == $taxonomy ) return true;
    }
    add_filter( ‘wpseo_sitemap_exclude_taxonomy’, ‘sitemap_exclude_taxonomy’, 10, 2 );

    do you have an idea why it doesn’t work?

    This should work. Just did for me:

    function sitemap_exclude_taxonomy( $value, $taxonomy ) {
    if ( ‘scope’ == $taxonomy
    || ‘layout_type’ == $taxonomy
    || ‘module_width’ == $taxonomy )
    return true;
    }
    add_filter( ‘wpseo_sitemap_exclude_taxonomy’, ‘sitemap_exclude_taxonomy’, 10, 2 );

    First mistake I made was not choosing the correct theme to edit under ‘Appearance > editor’

    Once I had the correct theme it still wouldn’t show the correct sitemap, figured maybe Yoast has some sort of caching, maybe not, but either way I then also went ahead and did this too…

    Went back into the Yoast sitemap settings and turned off the sitemaps feature. Saved. Refreshed my cache settings via my webproxy firewall, then turned the Yoast sitemap feature back on and saved.

    Checked my new sitemap.xml file and it was good! Only the two types I wanted now showed up. The rest were gone.

    Good luck!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Sitemap showing 404's’ is closed to new replies.