<?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>KAPISH::Blog &#187; wordpress-mu</title>
	<atom:link href="http://www.jayminkapish.com/tag/wordpress-mu/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jayminkapish.com</link>
	<description>About Me and Wordpress</description>
	<lastBuildDate>Wed, 14 Jul 2010 18:51:12 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=3.0-alpha</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Wordpress MU: get posts/pages from different blogs under same installation</title>
		<link>http://www.jayminkapish.com/2009/12/11/wordpress-mu-get-posts-pages-from-different-blogs-under-same-installation/</link>
		<comments>http://www.jayminkapish.com/2009/12/11/wordpress-mu-get-posts-pages-from-different-blogs-under-same-installation/#comments</comments>
		<pubDate>Fri, 11 Dec 2009 15:58:43 +0000</pubDate>
		<dc:creator>Jaymin Patel</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[Posts/Pages from different blogs]]></category>
		<category><![CDATA[Wordpress Loop]]></category>
		<category><![CDATA[wordpress-mu]]></category>

		<guid isPermaLink="false">http://www.jayminkapish.com/?p=205</guid>
		<description><![CDATA[How can you create a loop to get posts/pages from different blogs under same MU installation?
1) you can use switch_to_blog function
http://codex.wordpress.org/WPMU_Functions/switch_to_blog
2) create wordpress loop (this will get posts from the blog you just switched)
3) do whatever you want with data
4) restore current blog you are on so everything runs after this code go to the [...]]]></description>
			<content:encoded><![CDATA[<p>How can you create a loop to get posts/pages from different blogs under same MU installation?</p>
<p>1) you can use switch_to_blog function<br />
<a href="http://codex.wordpress.org/WPMU_Functions/switch_to_blog">http://codex.wordpress.org/WPMU_Functions/switch_to_blog</a></p>
<p>2) create wordpress loop (this will get posts from the blog you just switched)</p>
<p>3) do whatever you want with data</p>
<p>4) restore current blog you are on so everything runs after this code go to the blog it supposed to<br />
<a href="http://codex.wordpress.org/WPMU_Functions/restore_current_blog">http://codex.wordpress.org/WPMU_Functions/restore_current_blog</a></p>
<div class="phpcode"><code>switch_to_blog(1); // we are switching to blog id # 1<br />
query_posts('showposts=5'); //this would get top 5 posts from blog id # 1. you can change the loop to the get posts from x category<br />
if (have_posts()) :<br />
while (have_posts()) : the_post();<br />
//do whatever you want with data here...<br />
endwhile;<br />
endif;<br />
restore_current_blog();<br />
</code></div>
<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/06/13/comments-pagination-wordpress/" title="Comments Pagination &#8211; Wordpress &#8211; Bug Fixed!">Comments Pagination &#8211; Wordpress &#8211; Bug Fixed! (19)</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.jayminkapish.com/2009/12/11/wordpress-mu-get-posts-pages-from-different-blogs-under-same-installation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wordpress MU Site Upgrade Bug: Your server may not be able to connect to blogs running on it</title>
		<link>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/</link>
		<comments>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/#comments</comments>
		<pubDate>Thu, 08 Oct 2009 19:37:40 +0000</pubDate>
		<dc:creator>Jaymin Patel</dc:creator>
				<category><![CDATA[KAPISH]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[Wordpress MU 2.8.4]]></category>
		<category><![CDATA[Wordpress MU 2.8.4a]]></category>
		<category><![CDATA[Wordpress MU Site Upgrade]]></category>
		<category><![CDATA[wordpress-mu]]></category>

		<guid isPermaLink="false">http://blog.kapish.co.in/?p=180</guid>
		<description><![CDATA[Wordpress MU - Site Upgrade dies with message "Your server may not be able to connect to blogs running on it. Error message: 200: Operation timed out after 3 seconds with 0 bytes received"]]></description>
			<content:encoded><![CDATA[<p>I was upgrading mu site to 2.8.4. I went to Site Admin -> Upgrade and hit <strong>Upgrade Site</strong> button. It worked for first 25 &#8211; 30 blogs and then died with message</p>
<div class="phpcode"><code>Warning! Problem upgrading . Your server may not be able to connect to blogs running on it.<br />
Error message: 200: Operation timed out after 3 seconds with 0 bytes received<br />
</code></div>
<p><strong>This is what I did to fix my problem</strong></p>
<p>I opened wp-admin/wpmu-upgrade-site.php and wp-includes/http.php</p>
<div class="phpcode"><code>function &#038;_getTransport( $args = array() ) {</code></div>
<p>on line number 94 of wp-includes/http.php, wordpress tests different http request methods exist on your server during upgrade.</p>
<p>1st test was the culprit on my server which uses http_request method built into PHP. I guess this method was taking long time to resolve DNS and so it was timing out.</p>
<div class="phpcode"><code>if ( true === WP_Http_ExtHttp::test($args) ) {<br />
				$working_transport['exthttp'] = new WP_Http_ExtHttp();<br />
				$blocking_transport[] = &#038;$working_transport['exthttp'];<br />
			}</code></div>
<p>I did comment out this test and let Wordpress start with next one.</p>
<div class="phpcode"><code>if ( true === WP_Http_Curl::test($args) ) {<br />
				$working_transport['curl'] = new WP_Http_Curl();<br />
				$blocking_transport[] = &#038;$working_transport['curl'];<br />
			}</code></div>
<p>And guess what? All 150 blogs were updated in a few minutes without any problem.</p>
<p><em>If even curl does not work for you, you can comment it out and move on to the next until WP upgrade site works for you.</em></p>
<p>Good Luck!</p>
<h3>Related Posts</h3><ul class="related_post"><li><a href="http://www.jayminkapish.com/2008/06/13/comments-pagination-wordpress/" title="Comments Pagination &#8211; Wordpress &#8211; Bug Fixed!">Comments Pagination &#8211; Wordpress &#8211; Bug Fixed! (19)</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 (2)</a></li><li><a href="http://www.jayminkapish.com/2009/08/07/parent-child-theme-easiest-way/" title="Parent Child Theme &#8211; Easiest Way!">Parent Child Theme &#8211; Easiest Way! (0)</a></li><li><a href="http://www.jayminkapish.com/2009/03/17/json-and-wordpress/" title="JSON and Wordpress">JSON and Wordpress (6)</a></li></ul>]]></content:encoded>
			<wfw:commentRss>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/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<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/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 (2)</a></li><li><a href="http://www.jayminkapish.com/2009/08/07/parent-child-theme-easiest-way/" title="Parent Child Theme &#8211; Easiest Way!">Parent Child Theme &#8211; Easiest Way! (0)</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.jayminkapish.com/2008/06/13/comments-pagination-wordpress/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
		</item>
	</channel>
</rss>

<!-- Served from: www.jayminkapish.com @ 2010-07-30 06:31:25 by W3 Total Cache -->