Wordpress.com stats plugin not working

Ever had the problem that one day you logged into your wordpress blog and checked your stats, only to be shocked that your hits are flat lining? Well, I was, and it recently happened (after a theme change). So after a little investigation, I figured out the answer to the problem. The reason is that your footer.php no longer contains the call to the function wp_footer();.

I’m not sure if there are other reasons as to why it may fail, but this is the reason I saw it failing in my case. So first check your footer.php for the existence of the call to wp_footer(). If it exists, then your problem lies elsewhere. If it does not exist, then to solve it just put in the following code:

<?php wp_footer(); ?>

just above theĀ </body> tag in your page.

One reason why it suddenly started flat lining might be because you changed your theme, and the new theme is missing that function call. I’m not sure I can think of any other reasons besides that. I’ve read some places stating that an upgrade of wordpress caused it, but I would imagine that it failed because the upgrade to a newer version of wordpress also caused a theme change.

2 Comments

EugeneOctober 20th, 2008 at 2:39 pm

looking forward for more information about this. thanks for sharing. Eugene

RaviSNovember 5th, 2008 at 9:32 pm

Sudden use of ‘flat lining’, eh? And what’s with such a long time since a post anyway?

Leave a comment

Your comment