XML declaration allowed only at the start of the document

后端 未结 5 545
陌清茗
陌清茗 2021-01-14 10:08

My blog feed show error today:

This page contains the following errors:

error on line 2 at column 6: XML declaration allowed only at the s

5条回答
  •  难免孤独
    2021-01-14 10:23

    Every page on your page (included sitemaps) contains empty line at the begin. (You can see HTML source) You should remove this line to fix sitemaps. You can try following steps:

    Check your wp-config.php file for blank lines outside of bracketed sections.

    Check your theme’s functions.php file for blank lines outside of bracketed sections.

    One by one, disable plugins and revalidate until you isolate the one causing the problem ( How To Check For Plugin Conflicts )

    Note that the final php ?> should be omitted from all PHP code files - modules, includes, etc. (eg. wp-config.php, functions.php, ...).

提交回复
热议问题