Stats Problems With New Theme



stats

Does this look familiar?

You’ve found a great new theme for your WordPress blog, installed it, and later discovered that your stats are no longer working. You can see the stats graphic but it shows no visitors to your blog, even though you know people have visited your site. This has happened to me more times than I can remember. It is frustrating but there is a simple solution.

The first point of call is to disable the stats plugin and reactivate it. Occasionally this will do the trick, but more often than not the new WordPress theme you’ve installed is missing a bit of code. Most theme designers include this code, but for some reason others neglect to insert it into their theme.

Open up the footer of your wordpress theme in the editor and insert this code:

<?php wp_footer(); ?>

immediately before:

</body>

This information is available on the FAQ page for the WordPress.com Stats plugin.

Anytime you install a new theme it’s a good idea to check the source code for the wp_footer tag. It’s better to take a moment to check the tag is there than to discover hours or days later your stats aren’t being collected.


Friday, January 23rd, 2009.
Filed under: WordPress Tips

Add your comment