Removing Gravatars/Avatars in WordPress 2.7+ Themes

In WordPress 2.7, the wp_list_comments function was introduced, putting all of the elements of comments in one easy function. The new function comes with an imitation of the old get_avatar function built-in.

So how do you remove the avatars without removing the wp_list_comments function, which is much needed for outputting all of the other elements of the comment section?

The answer is to use CSS to hide the avatar. Place the following code into style.css:

.avatar {
display:none;
}

Hat tip: rhysboy84 from Sitepoint.

Tags: , ,


You might like:

12 Responses to “Removing Gravatars/Avatars in WordPress 2.7+ Themes”

  1. Jan says:

    Thank You! This is a very handy tip for anyone who wants to remove the Avatar.

    Personally, I rather like the avatars ~ sort of ‘lends character’ to a name. But there are some Avatars we could all probably “do without” :-)

  2. Dean Saliba says:

    Why would you want to remove the avatars? I find them a nice addition to the comments section.

  3. Avatars has been a part of blog content since then, but we can’t avoid sometimes that avatars slow down your blog. Blogger’s have their option when it comes to this matter. if they want avatars then go for it. as what the old quotations says that respect begets respect.

  4. chris, keep in mind that by using display:none you are only altering the look and feel of the design, not the actual avatar function. the avatars will still be loaded on your page, only that they will not be displayed. cheers.

  5. Nice tips. I also think no one should remove Gravaters from the blogs because most spam blockers such as Akismet will catch good comments from samps. But as you guys mentioned, it will still be loaded but not displayed. That makes sense.

  6. This is a great tip. I wanted to remove the gravater for a while, but i did k=not know it would be this easy

  7. My Feet Hurt says:

    What a great tip. Knowing that only the display, look and feeling of the site is changed and not the actual function changes everything and yet nothing. Thanks for the code I’m going to give this a shot right now.

  8. Lamp says:

    Skillful points. I as well think no one should move out Gravaters from the blogs as almost spam blockers specified Akismet will catch fine comments from spams. I liked reading it

  9. André says:

    Guys just go to wp-admin/options-discussion.php, and change the options to not show avatars.

Leave a Reply

*