<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>WebGrrrl.net, Home of Lorna Timbah On-line &#187; gravatar</title>
	<atom:link href="http://webgrrrl.net/tags/gravatar/feed" rel="self" type="application/rss+xml" />
	<link>http://webgrrrl.net</link>
	<description>I blog for the same reason I breathe -- because if I didn't, I would die. - Isaac Asimov + me@webgrrrl.net</description>
	<lastBuildDate>Thu, 08 Jul 2010 15:54:39 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>WordPress Comment hack: Display Gravatar on non-pingback comment types</title>
		<link>http://webgrrrl.net/archives/wordpress-comment-hack-display-gravatar-on-non-pingback-comment-types.htm</link>
		<comments>http://webgrrrl.net/archives/wordpress-comment-hack-display-gravatar-on-non-pingback-comment-types.htm#comments</comments>
		<pubDate>Sun, 05 Oct 2008 16:31:01 +0000</pubDate>
		<dc:creator>Lorna</dc:creator>
				<category><![CDATA[Discovering WordPress]]></category>
		<category><![CDATA[comments]]></category>
		<category><![CDATA[gravatar]]></category>
		<category><![CDATA[wp hack]]></category>

		<guid isPermaLink="false">http://webgrrrl.net/archives/wordpress-comment-hack-display-gravatar-on-non-pingback-comment-types.htm</guid>
		<description><![CDATA[<p>(This is a post from <a href="http://webgrrrl.net">WebGrrrl.net</a>)</p>
(This is a post from WebGrrrl.net) One of the reasons why I haven&#8217;t been paying much attention to this blog is the fact that I have started several new meant-to-monetize blogs over the past couple of months. Being very particular about my blog themes, I have been tweaking themes here and there while referring to [...]]]></description>
			<content:encoded><![CDATA[<p>(This is a post from <a href="http://webgrrrl.net">WebGrrrl.net</a>)</p>
<p>One of the reasons why I haven&#8217;t been paying much attention to this blog is the fact that I have started several new meant-to-monetize blogs over the past couple of months. Being very particular about my blog themes, I have been tweaking themes here and there while referring to the WordPress Codex for the template tags.</p>
<p>An issue I was trying to solve within this past hour was my Gravatars setting. I would like to display Gravatars only on normal comments left by visitors. I thought it makes no sense at all to display them on pingbacks, when all you get are those mystery man icons.</p>
<p>You&#8217;re suppose to add <a rel="nofollow" href="http://weblogtoolscollection.com/archives/2008/03/03/gravatars-and-wordpress-25/">the following code</a> to enable Gravatar support on WordPress comments:<br />
<strong><code>&lt;?php echo get_avatar( $comment, 32 ); ?&gt;</code></strong><br />
The code by itself doesn&#8217;t solve my dilemma. In other words, that code will display Gravatars on all of my comments, regardless of whether they are normal comments, pingbacks, or trackbacks.</p>
<p>The following simple hack, though, does exactly what I wanted:<br />
<strong><code>&lt;?php if($comment-&gt;comment_type=='') { echo get_avatar( $comment, 32 ); } ?&gt;</code></strong></p>
<p>Surprisingly, I couldn&#8217;t find any online documentation concerning disabling Gravatars on pingbacks, so I had to look through some of my very own customized themes as well as a little reference to my WP database to understand how I can go about solving it.</p>
<p>Sweet, eh? Try it yourself. WP theme developers may find this code handy.</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://webgrrrl.net/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>

<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://webgrrrl.net/archives/wordpress-comment-hack-display-gravatar-on-non-pingback-comment-types.htm/feed</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>
