Quantcast
Channel: WordPress.org Forums » [Yoast SEO - Advanced SEO with real-time guidance and built-in AI] Support
Viewing all articles
Browse latest Browse all 42467

Hedi on "[Plugin: WordPress SEO by Yoast] XML Sitemaps not working"

$
0
0

You get the 404 error when the post-sitemap.xml / page-sitemap.xml is empty.

Maybe this will help :

I had Post and Page missing in post-sitemap.xml / page-sitemap.xml. It was the Post/Page having the options "Include in Sitemap" is set to "Auto detect" AND "Meta Robots Index" is set to "Index"

You may change your post/page options this way :
"Include in Sitemap" set to "Always include" should work.
or
"Meta Robots Index" set to "Default for Post type, currently : Index" should work too.

If you don't want to change all posts/pages you can modify the plugin file inc/class-sitemaps.php : what works for me is changing the line 326 for the plugin version 1.3.4.4 (line 325 for the plugin version 1.4.4)
from
if ( wpseo_get_value( 'meta-robots-noindex', $p->ID ) && wpseo_get_value( 'sitemap-include', $p->ID ) != 'always' )
to
if ( wpseo_get_value( 'meta-robots-noindex', $p->ID ) == 1 && wpseo_get_value( 'sitemap-include', $p->ID ) != 'always' )


Viewing all articles
Browse latest Browse all 42467

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>