Thursday, January 22, 2009

Two ways to hide the smiley face of WordPress.com Stats plugin

Wordpress.com Stats is one bang-up plugin, created by Automattic, besides Akismet. In order to use it, all we need is the API key. The rest is automatic. This plugin, which does not run on our server, will accumulate information on pageviews, popular posts and pages, where your traffic is coming from, and what people click on when they leave. The stats can be seen on the dashboard.

In order to collect the stats, the plugin will display an image of smiley face, which is usually located at the bottom of the page. However, if you don't like it, you can actually hide it. Actually, it is very easy. Just append this css code snippet into your theme style.css file.
img#wpstats{width:0px;height:0px;overflow:hidden}

As an alternative, you can append this Javascript code snippet into footer.php, after the wp_footer().
<script type="text/javascript">
var e = document.getElementById("wpstats");
e.style.width = "0px";
e.style.height= "0px";
e.style.overflow = "hidden";
</script>

Good luck.

Update: If you are too lazy to hack the CSS file, you can use the WordPress.com Stats Smiley Remover Plugin.

2 comments :

  1. For anybody who's too technically terrified to do this, I've written a really simple plugin here (http://www.thisismyurl.com/featured/free-download...) that will take care of it for them. Chris

    ReplyDelete