Currently set to No Index
Currently set to No Follow

Get the Official WPSaviour App Now!


How to Hide the WordPress Stats Smiley the Right Way

For anyone who uses the stats plugin, you’ll notice it inserts a small smiley image in your footer. This image needs to be loaded to track the stats.

Some people might think this little smiley face is “cute”. The rest of you will find the smiley image unsightly (and possibly evil looking) and will look for ways to remove it. This post will go over:

  • First of all, what not to do when hiding the smiley
  • How to properly hide it, with some extra absolute position goodness for certain layouts
  • If you’d rather not hide it, how to easily center the smiley image

What Not to Do

Don’t ever use display:none to hide the WP Stats Smiley.

First of all, I want to go over the one thing you shouldn’t do when attempting to hide the WP Stats Smiley, and that’s use: display:none. Yeah, I said that twice, but I was just making sure you didn’t miss it.

Yeah, that’s the same code you can use to get a CSS Killswitch effect, but it’s definitely not something you want to be using to not display an image, which needs to be loaded to accurately display stats.

What to do instead

According to this post, the developer recommends to use the following code to your stylesheet (i.e. style.css) if you wish to hide the smiley:


Something similar to the above code would be the following:


The difference between visibility:hidden and display:none is visibility:hidden will still take up space in the design, while display:none will not (and remember, you can’t use display:none unless you want your stat tracking to be borked).

On certain layouts, there is a small problem with this code taking up space below the footer, so I’ve thought of a more creative solution.

Here’s an example of what I’m talking about, notice the smiley in the lower left corner which is causing the footer layout to break.

Evil Smiley

With the two above examples, the image, while not visible, would still take up space in the layout causing that light gray bar (which is the background color) to appear in the footer.

Absolute Positioning

A combination of absolute positioning plus the code above is a good way to eliminate this issue. You could try something like this:


Centering the Image

Depending on your layout, instead of hiding it, it may look somewhat better if the smiley image was centered. You can easily do this with the following snippet of code.

img#wpstats{display:block;margin: 0 auto}


  • Sets the image to display as block (instead of inline, by default).
  • Sets the left and right margins to automatic to effectively center the now block image.

You can use this CSS to properly center pretty much any “img” tag without using additional markup.

Download The WPSaviour App Now

Related posts
Beginner’s GuideBlogTips

Top 5 free payment gateway plugins for WordPress in India (2020)

Beginner’s GuideBlogTips

Best WooCommerce International Payment Gateways for WordPress in 2020

Best WordPress PluginsBlog

WordPress 5.4 Will Add Lazy-Loading to All Images

Beginner’s GuideBlog

How to Add a Preloader Animation to WordPress (Step by Step)

Sign up for our Newsletter and
stay informed

Leave a Reply

Your email address will not be published.