Support » Requests and Feedback » WordPress stats not XHTML compliant

  • Resolved Sovattha


    I cannot understand why the javascript code of WordPress stats is written at the very end of the document, outside of the body content.

    While verifying its XHTML compliance, I have an error saying that the tag <script> is in an illegal place.

Viewing 1 replies (of 1 total)
  • I also had this problem, but I found out that it’s not the plugin that’s not XHTML compliant — it’s the theme I’m currently using. Here’s how I fixed it:

    • Locate your theme’s footer file (should be wp-content/themes/<theme>/footer.php), and open it in your favourite text editor.
    • Find the line saying <?php wp_footer(); ?> somewhere near the end of the file and move it to the line directly above the line saying </body>.
    • Revalidate your document in the W3C validator.

    See? It’s easy! 🙂

Viewing 1 replies (of 1 total)
  • The topic ‘WordPress stats not XHTML compliant’ is closed to new replies.