问题
Well, I have strange issue. Most of Wordpress sites hosted on BlueHost have double tag when the HTML code has only one. Having double tag causes issues with Wordpress sites to be rendered properly (CSS is not triggered) or have overall functional issues (broken layout, menu etc).
Example:
rendered site: http://awesomescreenshot.com/0d62g32l26
and site URL: http://www.rosefiore.com/
Any clue what is going on?header.php: http://pastebin.com/pvgLfwGb footer.php: http://pastebin.com/iehsX77B index.php: http://pastebin.com/3BVE1U4V
回答1:
"Most of Wordpress sites hosted on BlueHost have double tag when the HTML code has only one."
Absolutely not. Where did you get this idea?
There are many reasons you could have a double body tag. Can you paste what you feel are relevant snippets from index.php, header.php, and footer.php inside your theme folder. I'll update my answer accordingly upon seeing these.
回答2:
Well, it looks like our BlueHost account got hacked and each WP installation got code injection into wp-config.php file which looks like http://pastebin.com/zbVFcUHZ
For me it looks like server level hack because all wp-config files were "infected" at exact same time, some of those sites were behind .htaccess password protection and WP engine prevents write to that file when WP is already installed.
来源:https://stackoverflow.com/questions/22228660/double-body-tag-causes-wordpress-site-not-working-properly