Thread Starter
pagrob
(@pagrob)
Is there an update planned or is there anything I can do to fix this?
Hi,
Viewing the source of the generated XML sitemap, I found that you have a plugin that alter the XML output. Looks like it tries to minify the XML. But the size of the XML exceeds its limit, so it doesn’t work and output a comment, which is invalid in XML.
There are 2 solutions for that:
– Exclude the sitemap XML from that plugin. To do this, please find the plugin settings and see if there’s an option to exclude URLs.
– Lower the number of posts in the XML sitemap to reduce the size of the sitemap. To do this, please use this snippet:
add_filter( 'slim_seo_sitemap_post_type_query_args', function( $query_args ) {
// Change number of URLs
$query_args['posts_per_page'] = 500;
return $query_args;
} );
Here I set the limit to 500, you can try to set a lower number to see if it works.
Thread Starter
pagrob
(@pagrob)
Solved by placing a Fewer number of posts in the XML sitemap. Many thanks