<?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: Show Popular Posts in WordPress &#8211; without a plugin</title>
	<atom:link href="http://www.bin-co.com/blog/2009/03/show-popular-posts-in-wordpress-without-a-plugin/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.bin-co.com/blog/2009/03/show-popular-posts-in-wordpress-without-a-plugin/</link>
	<description>Learn about the latest in Web Development - as soon as I do.</description>
	<lastBuildDate>Wed, 17 Mar 2010 23:13:18 -0700</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Brian</title>
		<link>http://www.bin-co.com/blog/2009/03/show-popular-posts-in-wordpress-without-a-plugin/comment-page-1/#comment-2420</link>
		<dc:creator>Brian</dc:creator>
		<pubDate>Sat, 07 Nov 2009 00:15:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.bin-co.com/blog/?p=240#comment-2420</guid>
		<description>Great tip!  I would add the improvement since all pages, revisions and posts are stored in the wp_posts table.  Update the MYSQL statement to be this:
&lt;code&gt;
$popular_posts = $wpdb-&gt;get_results(&quot;SELECT id,post_title FROM {$wpdb-&gt;prefix}posts WHERE post_status = &#039;publish&#039; AND post_type = &#039;post&#039; ORDER BY comment_count DESC LIMIT 0,10&quot;);
&lt;/code&gt;

This narrows the results to ONLY posts, not pages, and only those posts that are published, not just saved revisions.

Cheers!
Brian</description>
		<content:encoded><![CDATA[<p>Great tip!  I would add the improvement since all pages, revisions and posts are stored in the wp_posts table.  Update the MYSQL statement to be this:<br />
<code><br />
$popular_posts = $wpdb-&gt;get_results("SELECT id,post_title FROM {$wpdb-&gt;prefix}posts WHERE post_status = 'publish' AND post_type = 'post' ORDER BY comment_count DESC LIMIT 0,10");<br />
</code></p>
<p>This narrows the results to ONLY posts, not pages, and only those posts that are published, not just saved revisions.</p>
<p>Cheers!<br />
Brian</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Otto Rask</title>
		<link>http://www.bin-co.com/blog/2009/03/show-popular-posts-in-wordpress-without-a-plugin/comment-page-1/#comment-2419</link>
		<dc:creator>Otto Rask</dc:creator>
		<pubDate>Fri, 06 Nov 2009 10:01:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.bin-co.com/blog/?p=240#comment-2419</guid>
		<description>Thanks for posting, I was leaning towards this technique and your post made me choose it. Although I wish this could be expanded to take a some sort of an average between views and comments... I need to research a bit more, maybe make a post about it if I get it working. :)</description>
		<content:encoded><![CDATA[<p>Thanks for posting, I was leaning towards this technique and your post made me choose it. Although I wish this could be expanded to take a some sort of an average between views and comments&#8230; I need to research a bit more, maybe make a post about it if I get it working. <img src='http://www.bin-co.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jimmy</title>
		<link>http://www.bin-co.com/blog/2009/03/show-popular-posts-in-wordpress-without-a-plugin/comment-page-1/#comment-2281</link>
		<dc:creator>Jimmy</dc:creator>
		<pubDate>Sat, 29 Aug 2009 13:32:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.bin-co.com/blog/?p=240#comment-2281</guid>
		<description>Great! I&#039;ve tried it on of my blogs.</description>
		<content:encoded><![CDATA[<p>Great! I&#8217;ve tried it on of my blogs.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Simon</title>
		<link>http://www.bin-co.com/blog/2009/03/show-popular-posts-in-wordpress-without-a-plugin/comment-page-1/#comment-2053</link>
		<dc:creator>Simon</dc:creator>
		<pubDate>Sun, 02 Aug 2009 05:51:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.bin-co.com/blog/?p=240#comment-2053</guid>
		<description>Wow, great tip. I am gonna try to implement it on my site. Thanks!</description>
		<content:encoded><![CDATA[<p>Wow, great tip. I am gonna try to implement it on my site. Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: raol</title>
		<link>http://www.bin-co.com/blog/2009/03/show-popular-posts-in-wordpress-without-a-plugin/comment-page-1/#comment-1951</link>
		<dc:creator>raol</dc:creator>
		<pubDate>Wed, 22 Jul 2009 05:39:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.bin-co.com/blog/?p=240#comment-1951</guid>
		<description>Thanks Binny, 
made my work more easier..!</description>
		<content:encoded><![CDATA[<p>Thanks Binny,<br />
made my work more easier..!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: chaz</title>
		<link>http://www.bin-co.com/blog/2009/03/show-popular-posts-in-wordpress-without-a-plugin/comment-page-1/#comment-1713</link>
		<dc:creator>chaz</dc:creator>
		<pubDate>Tue, 23 Jun 2009 04:26:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.bin-co.com/blog/?p=240#comment-1713</guid>
		<description>What if we want to display the top 5 as simple links after the first post/article on the main page? How can we display this? How could we setup a cron file to output this code to a static include file to be called from the main page?</description>
		<content:encoded><![CDATA[<p>What if we want to display the top 5 as simple links after the first post/article on the main page? How can we display this? How could we setup a cron file to output this code to a static include file to be called from the main page?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anish K.S</title>
		<link>http://www.bin-co.com/blog/2009/03/show-popular-posts-in-wordpress-without-a-plugin/comment-page-1/#comment-1624</link>
		<dc:creator>Anish K.S</dc:creator>
		<pubDate>Wed, 27 May 2009 11:08:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.bin-co.com/blog/?p=240#comment-1624</guid>
		<description>Binny , i will try this.</description>
		<content:encoded><![CDATA[<p>Binny , i will try this.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gagan</title>
		<link>http://www.bin-co.com/blog/2009/03/show-popular-posts-in-wordpress-without-a-plugin/comment-page-1/#comment-1576</link>
		<dc:creator>Gagan</dc:creator>
		<pubDate>Tue, 12 May 2009 08:49:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.bin-co.com/blog/?p=240#comment-1576</guid>
		<description>Hey Thanks alot for the tip, I was searching this query on Google but did not find any solution. Thanks for the tip :)</description>
		<content:encoded><![CDATA[<p>Hey Thanks alot for the tip, I was searching this query on Google but did not find any solution. Thanks for the tip <img src='http://www.bin-co.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vivek</title>
		<link>http://www.bin-co.com/blog/2009/03/show-popular-posts-in-wordpress-without-a-plugin/comment-page-1/#comment-1553</link>
		<dc:creator>Vivek</dc:creator>
		<pubDate>Mon, 04 May 2009 06:49:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.bin-co.com/blog/?p=240#comment-1553</guid>
		<description>Thanks very much for this tip.</description>
		<content:encoded><![CDATA[<p>Thanks very much for this tip.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dinu</title>
		<link>http://www.bin-co.com/blog/2009/03/show-popular-posts-in-wordpress-without-a-plugin/comment-page-1/#comment-1381</link>
		<dc:creator>dinu</dc:creator>
		<pubDate>Mon, 23 Mar 2009 11:07:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.bin-co.com/blog/?p=240#comment-1381</guid>
		<description>I was using this on footer.. should add this again .. ( I lost it during an upgrade :( :(  )</description>
		<content:encoded><![CDATA[<p>I was using this on footer.. should add this again .. ( I lost it during an upgrade <img src='http://www.bin-co.com/blog/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />  <img src='http://www.bin-co.com/blog/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />   )</p>
]]></content:encoded>
	</item>
</channel>
</rss>
