• Resolved pagrob

    (@pagrob)


    This page contains the following errors:
    error on line 2 at column 6: XML declaration allowed only at the start of the document
    Below is a rendering of the page up to the first error.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter pagrob

    (@pagrob)

    Is there an update planned or is there anything I can do to fix this?

    Plugin Author Anh Tran

    (@rilwis)

    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

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘sitemap-post-type-post.xml’ is closed to new replies.