Announce: Chào mừng các bạn đến với blog cá nhân của Nguyễn Công Dũng. Đây là nơi chia sẻ tài liệu học Tiếng Anh cũng như những thủ thuật máy tính mình sưu tầm được. Chúc các bạn vui vẻ! Welcome to Nguyen Cong Dung's personal blog for sharing English learning materials as well as computer tricks. Having fun!

Labels

Tuesday, September 18, 2018

Fix error on line 2 at column 6: XML declaration allowed only at the start of the document

[Solved]

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.


------------
Check functions.php file to see if there is blank line before the start <?php or not, then check if there is any require code.

ex. require get_parent_theme_file_path('/inc/get_init.php');

check this file '/inc/get_init.php' or delete it. This works for me.

Other Solutions from Internet:

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 )

No comments:

Post a Comment