<?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>Jaymin Patel &#187; wordpress-2.5</title>
	<atom:link href="http://www.jayminkapish.com/tag/wordpress-2-5/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jayminkapish.com</link>
	<description>Wordpress Developer, New York</description>
	<lastBuildDate>Wed, 09 Nov 2011 15:33:24 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4-alpha-19719</generator>
		<item>
		<title>Comments Pagination &#8211; WordPress &#8211; Bug Fixed!</title>
		<link>http://www.jayminkapish.com/2008/06/13/comments-pagination-wordpress/</link>
		<comments>http://www.jayminkapish.com/2008/06/13/comments-pagination-wordpress/#comments</comments>
		<pubDate>Fri, 13 Jun 2008 20:09:09 +0000</pubDate>
		<dc:creator>Jaymin Patel</dc:creator>
				<category><![CDATA[KAPISH]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[code-snippet]]></category>
		<category><![CDATA[comments-pagination]]></category>
		<category><![CDATA[wordpress 2.3]]></category>
		<category><![CDATA[wordpress blog]]></category>
		<category><![CDATA[wordpress-2.5]]></category>
		<category><![CDATA[wordpress-mu]]></category>

		<guid isPermaLink="false">http://blog.kapish.co.in/?p=28</guid>
		<description><![CDATA[Comment pagination for wordpress 2.5 or MU. You can grab the code and create a plugin if you want to. Share your feedback via comments.]]></description>
			<content:encoded><![CDATA[<p>Actually, I did not create a plugin but I wrote a code snippet that did this job for me.</p>
<p><strong><em>Add these lines to comments.php in your active theme folder.</em></strong></p>
<div class="phpcode">
<code>$comments_per_page = 5;<br />
global $post;<br />
$total = $post->comment_count;<br />
if($total &gt; 0) {<br />
$apage=isset($_GET['apage']) ? intval($_GET['apage']) : 1;<br />
$comments=array_slice($comments, intval(($apage-1)*$comments_per_page),intval($comments_per_page));<br />
}<br />
</code>
</div>
<p><strong><em>Insert this code right after <code>if ($comments) </code>statement</em></strong></p>
<div class="phpcode">
<code>$commentCounter = (($apage-1)*$comments_per_page);<br />
$from_page = $commentCounter+1;<br />
if($apage == 1) {<br />
$to_page = $comments_per_page;<br />
if($total &lt; $to_page) {<br />
$to_page = $total;<br />
}<br />
}<br />
else {<br />
$to_page = $from_page + $comments_per_page - 1;<br />
if($to_page &gt; $total) {<br />
$to_page = $total;<br />
}<br />
}<br />
</code>
</div>
<p><strong><em>Insert this line where you want page links to appear in comments.php.</em></strong></p>
<div class="phpcode">
<code>&lt;?php echo paginate_links( array(<br />
'base' =&gt; add_query_arg( 'apage', '%#%#comments' ),<br />
'format' =&gt; '',<br />
'total' =&gt; ceil($total / intval($comments_per_page)),<br />
'current' =&gt; $apage<br />
));<br />
</code>
</div>
<p>I think this is it. It should work. Give it a try and share your feedback via comments.</p>
<h3>Related Posts</h3><ul class="related_post"><li><a href="http://www.jayminkapish.com/2009/10/08/wordpress-mu-site-upgrade-bug-your-server-may-not-be-able-to-connect-to-blogs-running-on-it/" title="Wordpress MU Site Upgrade Bug: Your server may not be able to connect to blogs running on it">Wordpress MU Site Upgrade Bug: Your server may not be able to connect to blogs running on it (3)</a></li><li><a href="http://www.jayminkapish.com/2008/02/07/migrate-from-utw-tags-to-wordpress-23-terms/" title="Migrate Tags from UTW Tags to Wordpress 2.3 Terms">Migrate Tags from UTW Tags to Wordpress 2.3 Terms (9)</a></li><li><a href="http://www.jayminkapish.com/2010/09/30/wordpress-instant-search-plugin/" title="Wordpress Instant Search Plugin">Wordpress Instant Search Plugin (1)</a></li><li><a href="http://www.jayminkapish.com/2009/12/11/wordpress-mu-get-posts-pages-from-different-blogs-under-same-installation/" title="Wordpress MU: get posts/pages from different blogs under same installation">Wordpress MU: get posts/pages from different blogs under same installation (0)</a></li><li><a href="http://www.jayminkapish.com/2009/12/08/secure-your-wordpress-installation/" title="Secure Your Wordpress Installation">Secure Your Wordpress Installation (0)</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.jayminkapish.com/2008/06/13/comments-pagination-wordpress/feed/</wfw:commentRss>
		<slash:comments>22</slash:comments>
		</item>
	</channel>
</rss>

<!-- Served from: www.jayminkapish.com @ 2012-02-07 02:29:22 by W3 Total Cache -->
