<?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>WpFunc &#187; Popular Posts</title>
	<atom:link href="http://wpfunc.com/tag/popular-posts/feed" rel="self" type="application/rss+xml" />
	<link>http://wpfunc.com</link>
	<description>Awesome, Quick, Simple WordPress Functions!</description>
	<lastBuildDate>Thu, 01 Dec 2011 01:17:01 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Popular Posts, Without any Plugin!</title>
		<link>http://wpfunc.com/wordpress/popular-posts-without-any-plugin.html</link>
		<comments>http://wpfunc.com/wordpress/popular-posts-without-any-plugin.html#comments</comments>
		<pubDate>Sat, 25 Jul 2009 08:25:14 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[function]]></category>
		<category><![CDATA[Popular Posts]]></category>
		<category><![CDATA[sidebar]]></category>
		<category><![CDATA[single.php]]></category>
		<category><![CDATA[Widget]]></category>

		<guid isPermaLink="false">http://www.wpfunc.com/?p=110</guid>
		<description><![CDATA[Hi everybody, you can show your most commented popular posts wtihout any plugin. It&#8217;s a simple code. Easy useable and appliable. We will edit siderbar.php or single.php. Where you want to show popular posts, you can edit any file. If you are ready, Lets begin&#8230;
Here is the code;
If you want to make a Popular Post [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">Hi everybody, you can show your most commented popular posts wtihout any plugin. It&#8217;s a simple code. Easy useable and appliable. We will edit siderbar.php or single.php. Where you want to show popular posts, you can edit any file. If you are ready, Lets begin&#8230;<span id="more-110"></span></p>
<h3>Here is the code;</h3>
<pre class="brush: plain; title: ; notranslate">&lt;h2&gt;Popular Posts&lt;/h2&gt;
&lt;ul&gt;
&lt;?php $result = $wpdb-&gt;get_results(&quot;SELECT comment_count,ID,post_title FROM $wpdb-&gt;posts ORDER BY comment_count DESC LIMIT 0 , 5&quot;);
foreach ($result as $post) {
setup_postdata($post);
$postid = $post-&gt;ID;
$title = $post-&gt;post_title;
$commentcount = $post-&gt;comment_count;
if ($commentcount != 0) { ?&gt;
&lt;li&gt;&lt;a href=&quot;&lt;?php echo get_permalink($postid); ?&gt;&quot; title=&quot;&lt;?php echo $title ?&gt;&quot;&gt;
&lt;?php echo $title ?&gt;&lt;/a&gt; {&lt;?php echo $commentcount ?&gt;}&lt;/li&gt;
&lt;?php } } ?&gt;
&lt;/ul&gt;</pre>
<p style="text-align: justify;">If you want to make a <em><strong>Popular Post Widget,</strong></em> you can use this code on <span style="color: #ff0000;"><em><strong>sidebar.php</strong></em></span> or if you want to show this after post, you have to add this code after loop in  <span style="color: #ff0000;"><strong><em>single.php</em></strong></span>.</p>
<p style="text-align: justify;">If you change the number &#8220;<em><strong>5</strong></em>&#8221; you can change Popular Posts Number :)</p>
<p style="text-align: justify;">That&#8217;s All! Have a nice day.</p>
]]></content:encoded>
			<wfw:commentRss>http://wpfunc.com/wordpress/popular-posts-without-any-plugin.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

