Changing WordPress Themes? Think Again!
Avoid Trouble Changing WordPress Themes
Are you changing your WordPress theme? Sure, go ahead, try a few! But if you decide to activate a new theme, just remember that you might “break” something when you do, so think again. I forgot to think again and lost two days of Blog Stats as a result of my mistake.
Perhaps this idea should be posted under the title “Measure twice, cut once” but that’s already taken by the home improvement crowd. So I will coin a new phrase to help us remember:
“Check twice, Activate once.”
For example, when you add WP Stats or Google Analytics, you are instructed to add code to your pages in order for these plugins to work. In my set-up, I chose to put this code in the footer.php file.
When you change themes, the footer.php file will most likely be overwritten by a different footer in the new theme. If you forget to go back and put the necessary code back in, you’ll be disappointed to find that your stats or other such plugins suddenly stop working.
As shown here, this line needs to be put just above the tag in footer.php:
<?php wp_footer(); ?>
If you have any questions, check with the installation or faq pages of the plugin that you are using.

Fortunately, if you put the code back, you only lose stats for the time that it was missing. All of your old stats will still be there.
So if you change themes, take some time to Think Again!