6 February 2009 8 Comments

How to remove the smiley face from a WordPress blog

So a little smiley face appears at the bottom of your blog, and it looks like this:

Well ain’t that the cutest thing! But what is it?

It’s the little .gif file that the WordPress Stats plug-in uses to monitor your page. It does so with some code like this…

1
<img src="http://stats.wordpress.com/g.gif?host=www.yoursite.com&rand=###############&blog=#######&v=###&post=#&ref=#" alt="" />;

…where the #’s are various characters. It’s all mystic WordPress voodoo which you don’t need to worry about.

Now I actually like the smiley face, but some people want to remove it from their blog. And it’s easy to do.

In wp-admin, head over to Appearance > Editor > style.css (or whatever your main style sheet is named). You then just add this bit of CSS:

1
2
3
4
/* Let's remove that Wordpress Stats Smiley Face ! */
img#wpstats {
     display: none;
}

There you have it! We’re just using plain and simple css to remove the smiley face from the screen, but still loading it so the page view gets counted.

So now you know how to remove the WordPress Stats smiley face. The question is, do you really want to?!

8 Responses to “How to remove the smiley face from a WordPress blog”

  1. Gleb Esman 11 February 2009 at 2:37 pm #

    Aren’t this suppose to do the trick? :

    WordPress Admin -> Settings -> Writing -> Formatting -> uncheck [ ] “Convert emoticons …”

    Gleb

    PS: Great tuts on Jquery on your site…thanks!

  2. Rich 20 February 2009 at 10:20 pm #

    I think you’re confusing the smiley face that WordPress stats uses, which is an image file (http://stats.wordpress.com/g.gif), with the colon followed by a close parentheses which looks like this :)

    Although WordPress use an image of a smiley face, it could be an image of anything.

    Hope that make sense!

  3. Christopher Ross 25 March 2009 at 3:23 pm #

    Hi, I know it’s a simple thing to add the CSS but there are some people who can’t get to there CSS files or are uncomfortable doing it so I came up with a plugin that does basically what you’ve done here for them. http://www.thisismyurl.com/featured/free-downloads/wordpresscom-stats-smiley-remover-plugin/

  4. CSSReX 3 April 2010 at 6:01 am #

    Hi,

    Thanks for this info and it did work. I knew some plugin is causing this however did not know that this was WP Stats. I appreciate that.

  5. Snack 7 April 2010 at 5:33 am #

    Christopher – thanks for this post. Cute? Maybe… but I thought my site had been hacked. Cute? I don’t think so… because the Smiley doesn’t show up when working on my site from my primary computer (where I installed the plugin from). The smiley only shows up to visitors and I only noticed once I viewed my website while traveling. WTF. This sure makes it seem like an effort to hide the smiley, if so why? And why not tell us about it and allow control? I have to seriously question what this plugins true goals are. Uninstalled for me until I find out.

  6. Jackson 12 April 2010 at 9:59 am #

    a while ago when upgrading to 2.7 wordpress stopped displaying smilies. not sure why but it happened.

  7. Tom Pappalardo 3 May 2010 at 2:15 pm #

    Maaaan, that’d been bugging me for awhile. I’ve been tweaking/editing a simple theme for awhile now and couldn’t figure out where that thing was coming from!

  8. Jeffery 8 July 2010 at 12:37 am #

    Hey, this is real handy info. It doesn’t show up in FF but it definitely comes up in IE8. Thanks for this Richard!


Leave a Reply