<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: How To: Adding Comment Numbers To Your WordPress Theme</title>
	<atom:link href="http://wphacks.com/how-to-adding-comment-numbers-to-your-wordpress-theme/feed/" rel="self" type="application/rss+xml" />
	<link>http://wphacks.com/how-to-adding-comment-numbers-to-your-wordpress-theme/</link>
	<description>WordPress Themes, Plugins, Hacks, Tutorials, and more!</description>
	<lastBuildDate>Sun, 21 Mar 2010 00:38:40 -0600</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Carla &#124; Green and Chic</title>
		<link>http://wphacks.com/how-to-adding-comment-numbers-to-your-wordpress-theme/#comment-13213</link>
		<dc:creator>Carla &#124; Green and Chic</dc:creator>
		<pubDate>Thu, 04 Mar 2010 17:41:06 +0000</pubDate>
		<guid isPermaLink="false">http://wphacks.com/how-to-adding-comment-numbers-to-your-wordpress-theme/#comment-13213</guid>
		<description>Thank you for these very easy instructions!</description>
		<content:encoded><![CDATA[<p>Thank you for these very easy instructions!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: How to Speed Up Your WordPress Blog by Having Less Plugins &#124; WebTechWise</title>
		<link>http://wphacks.com/how-to-adding-comment-numbers-to-your-wordpress-theme/#comment-13191</link>
		<dc:creator>How to Speed Up Your WordPress Blog by Having Less Plugins &#124; WebTechWise</dc:creator>
		<pubDate>Wed, 03 Mar 2010 10:12:12 +0000</pubDate>
		<guid isPermaLink="false">http://wphacks.com/how-to-adding-comment-numbers-to-your-wordpress-theme/#comment-13191</guid>
		<description>[...] count, comment numbers &#8211; no need to install plugins for those either (e.g. check this [...]</description>
		<content:encoded><![CDATA[<p>[...] count, comment numbers &#8211; no need to install plugins for those either (e.g. check this [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: CoutureNerd (CoutureNerd)</title>
		<link>http://wphacks.com/how-to-adding-comment-numbers-to-your-wordpress-theme/#comment-13090</link>
		<dc:creator>CoutureNerd (CoutureNerd)</dc:creator>
		<pubDate>Wed, 24 Feb 2010 14:05:04 +0000</pubDate>
		<guid isPermaLink="false">http://wphacks.com/how-to-adding-comment-numbers-to-your-wordpress-theme/#comment-13090</guid>
		<description>&lt;a rel=&quot;nofollow&quot; href=&quot;http://twitter.com/princesstimetoy&quot;&gt;@princesstimetoy&lt;/a&gt; its not a plug in but here you go it might help: http://wphacks.com/how-to-adding-comment-numbers-to-your-wordpress-theme/</description>
		<content:encoded><![CDATA[<p><a rel="nofollow" href="http://twitter.com/princesstimetoy">@princesstimetoy</a> its not a plug in but here you go it might help: <a href="http://wphacks.com/how-to-adding-comment-numbers-to-your-wordpress-theme/" rel="nofollow">http://wphacks.com/how-to-adding-comment-numbers-to-your-wordpress-theme/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: charlie</title>
		<link>http://wphacks.com/how-to-adding-comment-numbers-to-your-wordpress-theme/#comment-11901</link>
		<dc:creator>charlie</dc:creator>
		<pubDate>Wed, 16 Dec 2009 19:17:28 +0000</pubDate>
		<guid isPermaLink="false">http://wphacks.com/how-to-adding-comment-numbers-to-your-wordpress-theme/#comment-11901</guid>
		<description>Your code for what to put in the index.php has been cut off.  Can someone please edit so that we know how to show the number of the comment??? No use if the code isn&#039;t there.</description>
		<content:encoded><![CDATA[<p>Your code for what to put in the index.php has been cut off.  Can someone please edit so that we know how to show the number of the comment??? No use if the code isn&#8217;t there.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jay</title>
		<link>http://wphacks.com/how-to-adding-comment-numbers-to-your-wordpress-theme/#comment-11146</link>
		<dc:creator>Jay</dc:creator>
		<pubDate>Thu, 26 Nov 2009 20:38:03 +0000</pubDate>
		<guid isPermaLink="false">http://wphacks.com/how-to-adding-comment-numbers-to-your-wordpress-theme/#comment-11146</guid>
		<description>Thanks Justin, but look like some words are missing in your comment oO. What do we have to add in the index.php file ? Thanks</description>
		<content:encoded><![CDATA[<p>Thanks Justin, but look like some words are missing in your comment oO. What do we have to add in the index.php file ? Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: veza (Vesa)</title>
		<link>http://wphacks.com/how-to-adding-comment-numbers-to-your-wordpress-theme/#comment-10933</link>
		<dc:creator>veza (Vesa)</dc:creator>
		<pubDate>Fri, 20 Nov 2009 20:23:53 +0000</pubDate>
		<guid isPermaLink="false">http://wphacks.com/how-to-adding-comment-numbers-to-your-wordpress-theme/#comment-10933</guid>
		<description>&lt;a rel=&quot;nofollow&quot; href=&quot;http://twitter.com/HolleyV&quot;&gt;@HolleyV&lt;/a&gt; Wordpress # comments tut: http://wphacks.com/how-to-adding-comment-numbers-to-your-wordpress-theme/ #wordpress #tutorial</description>
		<content:encoded><![CDATA[<p><a rel="nofollow" href="http://twitter.com/HolleyV">@HolleyV</a> Wordpress # comments tut: <a href="http://wphacks.com/how-to-adding-comment-numbers-to-your-wordpress-theme/" rel="nofollow">http://wphacks.com/how-to-adding-comment-numbers-to-your-wordpress-theme/</a> #wordpress #tutorial</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sophie</title>
		<link>http://wphacks.com/how-to-adding-comment-numbers-to-your-wordpress-theme/#comment-10541</link>
		<dc:creator>Sophie</dc:creator>
		<pubDate>Sun, 01 Nov 2009 14:48:41 +0000</pubDate>
		<guid isPermaLink="false">http://wphacks.com/how-to-adding-comment-numbers-to-your-wordpress-theme/#comment-10541</guid>
		<description>Thanks for the solution Justin</description>
		<content:encoded><![CDATA[<p>Thanks for the solution Justin</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Justin</title>
		<link>http://wphacks.com/how-to-adding-comment-numbers-to-your-wordpress-theme/#comment-10536</link>
		<dc:creator>Justin</dc:creator>
		<pubDate>Sat, 31 Oct 2009 04:38:03 +0000</pubDate>
		<guid isPermaLink="false">http://wphacks.com/how-to-adding-comment-numbers-to-your-wordpress-theme/#comment-10536</guid>
		<description>--- *** SOLUTION *** ---

If you&#039;re looking for a way to do that in WP 2.8.X, here&#039;s how to:

Go in your comment-template.php file in the wp-includes folder, and go to the &quot;get_comments_number&quot; function (approx. line 520).

After &quot;global $id;&quot; (always in the &quot;get_comments_number&quot; function), add &quot; global $count; &quot;.

That&#039;s it! Now all you have to do, in your index.php file (or whatever), add 

I&#039;d recommand changing, in the &quot;get_comments_number&quot; function, the variable &quot;$count &quot; to something else so a plugin doesn&#039;t &quot;interfere&quot; with this global variable in the future. Per example, in my case, I renamed it to &quot;$countcomments&quot;. So it gives me this:

function get_comments_number( $post_id = 0 ) {
	global $id;
	global $countcomments; /* First modification */
	$post_id = (int) $post_id;

	if ( !$post_id )
		$post_id = (int) $id;

	$post = get_post($post_id);
	if ( ! isset($post-&gt;comment_count) )
		$countcomments = 0; /* Second modification */
	else
		$countcomments = $post-&gt;comment_count; /* Third modification */

	return apply_filters(&#039;get_comments_number&#039;, $countcomments); /* Fourth modification */
}

Now in my index.php, I just putted .

Good luck!</description>
		<content:encoded><![CDATA[<p>&#8212; *** SOLUTION *** &#8212;</p>
<p>If you&#8217;re looking for a way to do that in WP 2.8.X, here&#8217;s how to:</p>
<p>Go in your comment-template.php file in the wp-includes folder, and go to the &#8220;get_comments_number&#8221; function (approx. line 520).</p>
<p>After &#8220;global $id;&#8221; (always in the &#8220;get_comments_number&#8221; function), add &#8221; global $count; &#8220;.</p>
<p>That&#8217;s it! Now all you have to do, in your index.php file (or whatever), add </p>
<p>I&#8217;d recommand changing, in the &#8220;get_comments_number&#8221; function, the variable &#8220;$count &#8221; to something else so a plugin doesn&#8217;t &#8220;interfere&#8221; with this global variable in the future. Per example, in my case, I renamed it to &#8220;$countcomments&#8221;. So it gives me this:</p>
<p>function get_comments_number( $post_id = 0 ) {<br />
	global $id;<br />
	global $countcomments; /* First modification */<br />
	$post_id = (int) $post_id;</p>
<p>	if ( !$post_id )<br />
		$post_id = (int) $id;</p>
<p>	$post = get_post($post_id);<br />
	if ( ! isset($post-&gt;comment_count) )<br />
		$countcomments = 0; /* Second modification */<br />
	else<br />
		$countcomments = $post-&gt;comment_count; /* Third modification */</p>
<p>	return apply_filters(&#8216;get_comments_number&#8217;, $countcomments); /* Fourth modification */<br />
}</p>
<p>Now in my index.php, I just putted .</p>
<p>Good luck!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cheryl F. (The Lucky Ladybug)</title>
		<link>http://wphacks.com/how-to-adding-comment-numbers-to-your-wordpress-theme/#comment-10019</link>
		<dc:creator>Cheryl F. (The Lucky Ladybug)</dc:creator>
		<pubDate>Thu, 01 Oct 2009 04:42:26 +0000</pubDate>
		<guid isPermaLink="false">http://wphacks.com/how-to-adding-comment-numbers-to-your-wordpress-theme/#comment-10019</guid>
		<description>Could you update this for the newer versions of WordPress?  I&#039;m using 2.8.4.  The code in comments.php is totally different and it&#039;s hard to figure out where to put what.  Thank You!</description>
		<content:encoded><![CDATA[<p>Could you update this for the newer versions of WordPress?  I&#8217;m using 2.8.4.  The code in comments.php is totally different and it&#8217;s hard to figure out where to put what.  Thank You!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: matt</title>
		<link>http://wphacks.com/how-to-adding-comment-numbers-to-your-wordpress-theme/#comment-9414</link>
		<dc:creator>matt</dc:creator>
		<pubDate>Mon, 31 Aug 2009 07:22:04 +0000</pubDate>
		<guid isPermaLink="false">http://wphacks.com/how-to-adding-comment-numbers-to-your-wordpress-theme/#comment-9414</guid>
		<description>thank you, i have a problem. somehow my comments-count does work blog-wide?? not only the comments of each post get counted from 1 to whatever, but the comments of all posts get counted! so it could be that i have a 10 posts on my blog, every post has a few comments, so the tenth post starts with comment number 35??? what i&#039;m doing wrong?</description>
		<content:encoded><![CDATA[<p>thank you, i have a problem. somehow my comments-count does work blog-wide?? not only the comments of each post get counted from 1 to whatever, but the comments of all posts get counted! so it could be that i have a 10 posts on my blog, every post has a few comments, so the tenth post starts with comment number 35??? what i&#8217;m doing wrong?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
