My previous post was about the FancyZoom WordPress Plugin, which has made me extremely happy by simplifying an annoyingly repetitive and tedious part of posting images in the blog. All hail the FancyZoom WordPress Plugin, I’d recommend it to anyone planning on, or currently using WordPress for their blog.

Well, I didn’t stop there with the site updates; I finally got two more crucial WordPress plugins installed and working correctly. Enter the Wordpress.com Stats and Akismet plugins.

First off, let’s take a quick look at Akismet. Akismet handles monitoring of any and all comments and trackbacks for your blog, making very accurate assumptions as to whether they may or may not be spam, and flagging them as spam for you automatically if need be. Even with a minimal amount of average visits per day, before I got this plugin working, I had daily spam attempts submitted to the comments of the blog. Luckily, none got through to the blog itself, since they were immediately flagged as possible spam by my discussion/comment section settings. Everyday I’d log in to the admin area, and navigate to the comments section to find some attempted spam comments full of links to god knows what (most likely either pay-per-click type programs, or virus/spyware/malware download links). I would select all the obvious spam comments flagged for moderation by checking the checkboxes next to them, and clicking “Mark As Spam”. But now, Akismet does all that for me without a hitch! Check it out here.

On to the super useful WordPress.com Stats plugin! The Wordpress.com Stats plugin does just as it sounds, keeping track of all visits to the site and where. It uses this data to generate reports and graphs for the admin of the WordPress blog. I tried setting the plugin up before by using my WordPress.com assigned API key (you’ll need one to use the WordPress.com Stats plugin - if you don’t have a WordPress API, you can get one here), but something wasn’t working correctly and the stats weren’t showing up at all, even though the plugin’s settings page said it was installed, activated and working correctly. A quick glance at the WordPress.com Stats FAQ Page showed me a possible explanation:

Quote or excerpt from other site.What if the stats don’t start showing up? Do I need anything special in my theme?

Yes, your theme must have a call to <?php wp_footer(); ?> at the very bottom right before the </body> tag.

After reading this information, I was able to get the stats to show up correctly within minutes. If you have the WordPress.com Stats plugin installed and running correctly on your WordPress blog but your blog’s stats still aren’t showing up, here’s a quick explanation of how to fix it:

How to get your WordPress.com Stats plugin to work correctly:

  1. Log into your WordPress blog admin area, and navigate to your theme editing section. In version 2.5 of WordPress, you would click “Design”, then “Theme Editor”. You should now see something like this:
  2. Now click on the link on the right to open the “footer.php” file for editing. This file is where the </body> tag should be.
  3. Insert <?php wp_footer(); ?> directly above the </body> tag. Now just save the changes by clicking the “Update File” button near the bottom of the page. You’re all done!

Explanation

Basically, the WordPress.com Stats plugin seems to log data (visa vie visitor visits and clicks) for each page of your blog that someone visits. Just having the plugin installed and activated alone isn’t enough to complete this task. Each page of your blog needs to have some sort of call to the plugin (or functions that the plugin monitors) so the plugin will add the data successfully. I’m assuming that some or most themes already have this call in their “footer.php” file, but some may not, as with my situation. If you don’t have this call on each blog page, the plugin will never get called thereby not recording any data for your blog, so no stats show up. After inserting the line as described above, every time a page of your blog is visited, the footer.php file of the currently used theme will call the plugin which will record the data and later display it for you (on the dashboard page of your WordPress admin area). After you understand this, you will realize that the process above might need repeated if you change the theme of your blog. And, if you’ve got some extra time to kill, you could just add it into any themes that need it now before you change the theme. To complete the process for WordPress blog themes stored on the blog’s server other than the one currently being used, simply follow the same process above, except that once you’ve completed Step 1, select a different theme to edit from the “Select theme to edit:” drop down box:

Did this tutorial and explanation help you? Have questions/comments?

Put your experience in the comments. ^_^