Provide zblog template_zblog them_wordpress template download and customization

Wordpress prompts "XML parsing error: XML or text declaration is not at the beginning of the entity"

Tianxing Studio 2020-01-04 15:46 Wordpress Tutorial two thousand four hundred and five 0 Comments


Testing today wordpress It was found that ajax failed when adding categories. The browser f12 displayed the message "XML parsing error: XML or text declaration is not at the beginning of the entity". As shown below:

 Wordpress prompts "XML parsing error: XML or text declaration is not at the beginning of the entity" XML parsing error Wordpress Tutorial Wordpress Problems Wordpress Tutorial Page 1

After searching on the Internet, I finally found out that the prompt appeared because there were redundant spaces on the page.

The debugger also confirms that this is the cause:

 Wordpress prompts "XML parsing error: XML or text declaration is not at the beginning of the entity" XML parsing error Wordpress Tutorial Wordpress Problems Wordpress Tutorial Page 2

Once you know the cause of the problem, you can solve it through troubleshooting.

First, check the theme and change the default theme. It is proved that the theme is the cause.

Then check the function file that comes with the theme, and finally find that it is caused by redundant spaces in the back door of a file "?>" of the theme

If you happen to encounter this problem, you can check the following according to the idea of this article. Generally, it is caused by redundant spaces in the code of the theme or plug-in.


Can't find a tutorial that can solve your problem?

You can try to search or ask questions directly online. We also provide charging technical support. If you need it, you can contact us online.

Online questions Online Service

welcome you Comment: Cancel Reply

 Please fill in the verification code
  • Latest articles
  • Hot article ranking
  • Most Comments
Label aggregation
  • Sign in
  • Registered account Forgot your password?
  • register
  • Already have an account? Direct login Forgot your password?
  • Social account login