Posts Tagged WordPress.com Stats
Fixing your theme so that it works with WordPress.com Stats…
Posted by clifgriffin in Technology on December 29th, 2008
WordPress.com Stats is one of the most popular WordPress plugins. I have tried using it in the past, but it never collected stats. I never actually pursued a solution to this because I was using another stats plugin that was partially functional and able to give me most of the information I wanted.
Today I spent a little time searching the WordPress support forums and found that my theme was missing a function call that the plugin relies on.
Simply put, in your theme’s footer.php file, right above your </body> and </html> tags, you need to add:
<?php wp_footer(); ?>
And that’s all there is to it. You can be sure that this is safe to add because every theme is supposed to have this line. wp_footer() doesn’t generate any output so you shouldn’t see any changes to your site’s display.
If it still doesn’t work, be sure you are testing it while logged out. (You can always use another browser to save time.) It will not register hits from a logged in user. Failing that, if you’re using the WP-Super-Cache (as you should be) plugin, try clearing your cache.
Recent Comments