<?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</title>
	<atom:link href="http://www.jayminkapish.com/category/wordpress/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>Secure Your Wordpress Installation</title>
		<link>http://www.jayminkapish.com/2009/12/08/secure-your-wordpress-installation/</link>
		<comments>http://www.jayminkapish.com/2009/12/08/secure-your-wordpress-installation/#comments</comments>
		<pubDate>Tue, 08 Dec 2009 21:50:28 +0000</pubDate>
		<dc:creator>Jaymin Patel</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[securing-wordpress]]></category>

		<guid isPermaLink="false">http://www.jayminkapish.com/?p=199</guid>
		<description><![CDATA[How you can secure your wordpress installation]]></description>
			<content:encoded><![CDATA[<p>Very nice presentation @ Wordcamp NYC this year on Wordpress Security.</p>
<p>Slides: <a href="http://www.slideshare.net/williamsba/wordpress-security-updated">http://www.slideshare.net/williamsba/wordpress-security-updated</a></p>
<p>Video on Vimeo: <a href="http://www.vimeo.com/7685380">http://www.vimeo.com/7685380</a></p>
<p>Also upgrade your blog as soon as new version comes out.</p>
<p>Can we say now <strong>&#8220;Hack it if you can!&#8221;</strong>?</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/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><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/2008/04/16/google-shared-items-in-posts/" title="Google Shared Items in post using shortcode">Google Shared Items in post using shortcode (0)</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.jayminkapish.com/2009/12/08/secure-your-wordpress-installation/feed/</wfw:commentRss>
		<slash:comments>2</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>Wordpress: Calculate font-size in Tag Cloud</title>
		<link>http://www.jayminkapish.com/2009/08/25/wordpress-calculate-font-size-in-tag-cloud/</link>
		<comments>http://www.jayminkapish.com/2009/08/25/wordpress-calculate-font-size-in-tag-cloud/#comments</comments>
		<pubDate>Tue, 25 Aug 2009 14:38:49 +0000</pubDate>
		<dc:creator>Jaymin Patel</dc:creator>
				<category><![CDATA[KAPISH]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[Tag Cloud]]></category>

		<guid isPermaLink="false">http://blog.kapish.co.in/?p=152</guid>
		<description><![CDATA[How to: calculate font-size in tag cloud]]></description>
			<content:encoded><![CDATA[<div class="phpcode"><code>$fontSizeUnits = "px";<br />
$fontSizeMin = 15;<br />
$fontSizeMax = 50;<br />
$maxValue = 12;<br />
$minValue = 1;<br />
</code></div>
<p>where <strong>$results</strong> is MySQL result set.</p>
<div class="phpcode"><code>foreach ($results as $result) {<br />
$tag = $result->name;<br />
$tagURI = get_option('home') . '/' . $result->taxonomy . '/' . $result->slug . '/';<br />
$count = $result->count;<br />
$weight = ( $count - $minValue ) / ( $maxValue - $minValue );<br />
$fontSize = $fontSizeMin + round( ($fontSizeMax - $fontSizeMin) * $weight );<br />
echo "&lt;li style='display: inline-block; font-size:". $fontSize. $fontSizeUnits."'&gt;&lt;a href=".$tagURI." title='(".$count." posts)'&gt;".$tag."&lt;/a&gt;&lt;/li&gt;";<br />
}<br />
</code></div>
<h3>Most Commented 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/2008/01/18/wordpress-database-schema/" title="Wordpress Database Schema">Wordpress Database Schema (13)</a></li><li><a href="http://www.jayminkapish.com/2009/06/16/date-archive-for-a-category/" title="Date archive for a category">Date archive for a category (10)</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/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/08/25/wordpress-calculate-font-size-in-tag-cloud/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Parent Child Theme &#8211; Easiest Way!</title>
		<link>http://www.jayminkapish.com/2009/08/07/parent-child-theme-easiest-way/</link>
		<comments>http://www.jayminkapish.com/2009/08/07/parent-child-theme-easiest-way/#comments</comments>
		<pubDate>Sat, 08 Aug 2009 01:46:10 +0000</pubDate>
		<dc:creator>Jaymin Patel</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[inherited themes]]></category>
		<category><![CDATA[parent child themes]]></category>
		<category><![CDATA[Wordpress MU 2.6.5]]></category>
		<category><![CDATA[wordpress parent child theme]]></category>

		<guid isPermaLink="false">http://blog.kapish.co.in/?p=114</guid>
		<description><![CDATA[This solution will work for you if you want your child theme have fewer templates and if any template is missing, it should not break your blog but should go to parent theme and load it.]]></description>
			<content:encoded><![CDATA[<p>This solution will work for you if you want your child theme have fewer templates and if any template is missing, it should not break your blog but should go to parent theme and load it.</p>
<p>And a few important things to set,<br />
1) parent theme folder name<br />
2) child theme folder name<br />
3) Template set in child theme style.css must match parent theme folder name</p>
<p>Because child theme name and Template set in child theme style.css are stored in options table.<br />
<span id="more-114"></span><br />
So I started looking into wordpress core files</p>
<div class="phpcode"><code> wp-includes/template-loader.php<br />
wp-includes/theme.php<br />
</code></div>
<p>These files load templates from active theme on your blog.</p>
<p><strong>What parent theme must have</strong><br />
Your parent theme must have all template files necessary for any typical wordpress theme and parent <strong>style.css</strong> must have these lines</p>
<div class="phpcode"><code>/*<br />
Theme Name: Parent Theme<br />
Theme URI: Your Blog URL<br />
Description: My Parent Theme<br />
Version: 0.1<br />
Author: Your Name<br />
Author URI: mailto:your_email_goes_here<br />
*/<br />
</code></div>
<p><strong>What child theme must have</strong></p>
<p><strong>style.css</strong> must have these lines where <strong>my_child_theme</strong> must be the name of child theme folder and <strong>my_parent_theme</strong> must be the name of parent theme folder.</p>
<div class="phpcode"><code>/*<br />
Theme Name: my_child_theme<br />
Theme URI: Your Blog URL<br />
Description: My Child Theme<br />
Version: 0.1<br />
Author: Your Name<br />
Author URI: mailto:your_email_goes_here<br />
Template: my_parent_theme<br />
*/<br />
</code></div>
<p>and <strong>screenshot.png</strong> and <strong>functions.php</strong></p>
<p>functions.php should add_filter to &#8216;home_template&#8217;</p>
<div class="phpcode"><code>add_filter('home_template', 'load_child_home_template');<br />
</code></div>
<p>I am going to take home/index template as an example here. Lets say child theme is having these files. What does this mean? This means you want index.php/home.php loaded from child theme and everything else should come from parent theme.<br />
1) style.css<br />
2) screenshot.png<br />
3) index.php or home.php<br />
4) functions.php</p>
<p>wp-includes/theme.php has</p>
<div class="phpcode"><code>function get_home_template() {<br />
$template = '';<br />
if ( file_exists(TEMPLATEPATH . "/home.php") )<br />
$template = TEMPLATEPATH . "/home.php";<br />
elseif ( file_exists(TEMPLATEPATH . "/index.php") )<br />
$template = TEMPLATEPATH . "/index.php";<br />
return apply_filters('home_template', $template);<br />
}</p>
<p></code></div>
<p>Wordpress applies filters at the end and we are going to take advantage of it.</p>
<p>child theme functions.php must have this function as well</p>
<div class="phpcode"><code>function load_child_home_template($template) {<br />
if(empty($template)) {<br />
$template = 'index.php'; /* if you have home.php, replace index.php with home.php */<br />
}<br />
return check_child_template($template);<br />
}<br />
function check_child_template($template) {<br />
$template_file_name = basename($template);<br />
$template_option = get_option('template'); /* has 'my_parent_theme' */<br />
$current_theme_option = get_option('current_theme'); /* has 'my_child_theme' */<br />
$theme_root = get_theme_root();<br />
$child_template_root = $theme_root . '/' . $current_theme_option;<br />
$child_template = $child_template_root . '/' . $template_file_name;<br />
$parent_template_root = $theme_root . '/' . $template_option;<br />
$parent_template = $parent_template_root . '/' . $template_file_name;<br />
if(file_exists($child_template)) {<br />
return $child_template; /* if child theme has index.php/home.php, load it */<br />
}<br />
else if(file_exists($parent_template)) { /* if child is missing index.php/home.php, load index.php/home.php from parent */<br />
return $parent_template;<br />
}<br />
return $template;<br />
}</p>
<p></code></div>
<p>You may want to put some html comments in parent theme index.php/home.php and child theme index.php/home.php to debug which theme is serving home page by looking into source code.</p>
<p>More on themes on <a href="http://codex.wordpress.org/Using_Themes#Creating_Themes">Wordpress Codex</a></p>
<h3>Related Posts</h3><ul class="related_post"><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/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/2009/03/17/json-and-wordpress/" title="JSON and Wordpress">JSON and Wordpress (6)</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><li><a href="http://www.jayminkapish.com/2008/04/16/google-shared-items-in-posts/" title="Google Shared Items in post using shortcode">Google Shared Items in post using shortcode (0)</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.jayminkapish.com/2009/08/07/parent-child-theme-easiest-way/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wordpress: Automatically adjust for daylight saving time</title>
		<link>http://www.jayminkapish.com/2008/11/12/wordpress-automatically-adjust-for-daylight-saving-time/</link>
		<comments>http://www.jayminkapish.com/2008/11/12/wordpress-automatically-adjust-for-daylight-saving-time/#comments</comments>
		<pubDate>Wed, 12 Nov 2008 17:55:36 +0000</pubDate>
		<dc:creator>Jaymin Patel</dc:creator>
				<category><![CDATA[KAPISH]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[daylight saving time]]></category>
		<category><![CDATA[daylight saving time and wordpress]]></category>
		<category><![CDATA[daylight saving time wordpress plugin]]></category>
		<category><![CDATA[wordpress and daylight saving time]]></category>
		<category><![CDATA[wordpress timezone settings]]></category>

		<guid isPermaLink="false">http://blog.kapish.co.in/?p=29</guid>
		<description><![CDATA[Wordpress Plugin to adjust daylight saving time automatically.]]></description>
			<content:encoded><![CDATA[<p>I have been googling for this and (again) I had to come up with my own solution.</p>
<div class="phpcode">
<pre>
<code>function my_set_gmt_offset($offset) {
        global $wpdb;

        /* Wordpress default sets to UTC timezone
        in wp-settings.php.
        you can change this line to whatever your timezone is.
        I set it to my timezone (NY)
        More: http://www.php.net/manual/en/timezones.php
        */

        if(function_exists('date_default_timezone_set'))
	        date_default_timezone_set('America/New_York');

	$timezone = date("T");

        /* Now we have your local timezone stored in $timezone
        so lets restore wordpress setting as in wp-settings.php */

        if ( function_exists('date_default_timezone_set') )
	       date_default_timezone_set('UTC');

	$current_offset = $offset;

	if($timezone == 'EDT') {
		$offset = '-4';
	}
	else if($timezone == 'EST') {
		$offset = '-5';
	}

	if($offset != $current_offset) {
		/* update offset in database if new offset is different.
		   Do not use update_option since it will call
                   this filter again and cause infinite loop.
		 */
		$wpdb->query( $wpdb->prepare( "UPDATE $wpdb->options
		SET option_value = %s WHERE
		option_name = %s", $offset, 'gmt_offset' ) );

		/* let wordpress regenerate cache from database */
		wp_cache_set('gmt_offset', 'checkthedatabaseplease', 'options');
	}

	return $offset;
}

add_filter('option_gmt_offset', 'my_set_gmt_offset');
</code></pre>
</div>
<p>Share your feedback via comments.</p>
<h3>Most Commented 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/2008/01/18/wordpress-database-schema/" title="Wordpress Database Schema">Wordpress Database Schema (13)</a></li><li><a href="http://www.jayminkapish.com/2009/06/16/date-archive-for-a-category/" title="Date archive for a category">Date archive for a category (10)</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/03/17/json-and-wordpress/" title="JSON and Wordpress">JSON and Wordpress (6)</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.jayminkapish.com/2008/11/12/wordpress-automatically-adjust-for-daylight-saving-time/feed/</wfw:commentRss>
		<slash:comments>1</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>
		<item>
		<title>Joomla or Wordpress?</title>
		<link>http://www.jayminkapish.com/2008/03/06/joomla-or-wordpress/</link>
		<comments>http://www.jayminkapish.com/2008/03/06/joomla-or-wordpress/#comments</comments>
		<pubDate>Thu, 06 Mar 2008 16:55:38 +0000</pubDate>
		<dc:creator>Jaymin Patel</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[asides]]></category>
		<category><![CDATA[joomla]]></category>
		<category><![CDATA[open-source-software]]></category>

		<guid isPermaLink="false">http://blog.kapish.co.in/2008/03/06/joomla-or-wordpress/</guid>
		<description><![CDATA[Joomla is primed to be the next favorite Open Source Software or you think Wordpress can be?]]></description>
			<content:encoded><![CDATA[<p>Joomla is primed to be the next favorite <span id="lw_1204822668_0" class="yshortcuts">Open Source Software</span>, or that it already is? <a href="http://wordpressgarage.com/news-views/google-trends-wordpress-movable-type-joomla/">More on WordpressGarage.com</a></p>
<h3>Related Posts</h3><ul class="related_post"><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/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/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><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/2008/03/06/joomla-or-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Migrate Tags from UTW Tags to Wordpress 2.3 Terms</title>
		<link>http://www.jayminkapish.com/2008/02/07/migrate-from-utw-tags-to-wordpress-23-terms/</link>
		<comments>http://www.jayminkapish.com/2008/02/07/migrate-from-utw-tags-to-wordpress-23-terms/#comments</comments>
		<pubDate>Thu, 07 Feb 2008 16:45:36 +0000</pubDate>
		<dc:creator>Jaymin Patel</dc:creator>
				<category><![CDATA[KAPISH]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[php code]]></category>
		<category><![CDATA[slug]]></category>
		<category><![CDATA[ultimate tag warrior plugin]]></category>
		<category><![CDATA[ultimate tag warrior tags tables]]></category>
		<category><![CDATA[ultimate warrior]]></category>
		<category><![CDATA[UTW]]></category>
		<category><![CDATA[wordpress 2.3]]></category>
		<category><![CDATA[wordpress tags]]></category>
		<category><![CDATA[wordpress terms tables]]></category>

		<guid isPermaLink="false">http://blog.kapish.co.in/2008/02/07/migrate-from-utw-tags-to-wordpress-23-terms/</guid>
		<description><![CDATA[Migrating tags from Ultimate Tag Warrior or UTW plugin to Wordpress Terms.]]></description>
			<content:encoded><![CDATA[<p>I was running wordpress 2.0.5 since 2 years and did not get time to upgrade to <span id="lw_1202402549_0" class="yshortcuts">Wordpress</span> 2.3.</p>
<p>So I decided last week to upgrade to Wordpress 2.3 and I did. I upgrade the same way how wordpress advice us <a href="http://codex.wordpress.org/Upgrading_WordPress">here</a>.</p>
<p>After installation, I did notice it has migrated my categories tables to wordpress 2.3 Terms tables but nothing migrated from Tags tables. I was surprised! Did I make any mistake? Then it comes into my mind, it is Ultimate Tag Warrior plugin, which has created those tables for me not Wordpress.</p>
<p>Now I had to migrate those tags from Tags table to Terms tables. So I wrote a script that does that job for me. I thought let me make that available to you, if someone would like to extend the script and build a smart plugin! <span id="more-22"></span></p>
<p>I would like you to read this before you use this script:</p>
<ol>
<li>Take backup of your database. It is not going to delete anything in the database though.</li>
<li>Make sure you have Tags tables from Ultimate Tag Warrior in your database.</li>
<li>Since Unique index created on slug column in Terms table, this script will add &#8216;2&#8242; add the end of tag if any duplicate key/slug found in the Terms table.</li>
<li>Set MySQL Connection parameters in this file.</li>
<li>Upload it to your server and run it. Just run it once!</li>
<li>Do no forget to share your feedback via comments!</li>
</ol>
<p>If you would like to look at it and review/install, <a href="http://blog.kapish.co.in/wp-content/uploads/2008/02/post2tagTotaxonomy.zip">please download PHP Code here</a>.</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/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/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/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/2008/02/07/migrate-from-utw-tags-to-wordpress-23-terms/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Wordpress Database Schema</title>
		<link>http://www.jayminkapish.com/2008/01/18/wordpress-database-schema/</link>
		<comments>http://www.jayminkapish.com/2008/01/18/wordpress-database-schema/#comments</comments>
		<pubDate>Fri, 18 Jan 2008 18:29:20 +0000</pubDate>
		<dc:creator>Jaymin Patel</dc:creator>
				<category><![CDATA[KAPISH]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[database schema]]></category>
		<category><![CDATA[png]]></category>
		<category><![CDATA[wordpress 2.7]]></category>
		<category><![CDATA[wordpress 2.7 database schema]]></category>
		<category><![CDATA[wordpress database schema]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://blog.kapish.co.in/2008/01/18/wordpress-database-schema/</guid>
		<description><![CDATA[Tired of searching Wordpress Database Schema on Internet? Your search has ended now.]]></description>
			<content:encoded><![CDATA[<p>Wordpress 3.0 Database Schema is up on <a title="Wordpress Database Schema/Diagram" href="http://codex.wordpress.org/Database_Description" target="_blank">Wordpress site</a>.</p>
<p>Take a look at the following older versions.</p>
<ul>
<li><span style="color: #ff0000;"><strong>New</strong></span> <a title="Wordpress 2.7 Database Schema PNG" href="http://blog.kapish.co.in/wp-content/uploads/2009/03/wp_2.7.png" target="_blank">Wordpress 2.7 Database Schema PNG</a></li>
<li><a title="Wordpress 2.0.5 Database Schema PNG" href="http://blog.kapish.co.in/wp-content/uploads/2008/01/wp_db.png" target="_blank">Wordpress 2.0.5 Database Schema PNG</a></li>
<li><a title="Wordpress 2.3 Database Schema PNG" href="http://blog.kapish.co.in/wp-content/uploads/2008/01/wp23_db.png" target="_blank">Wordpress 2.3 Database Schema PNG</a></li>
</ul>
<h3>Related Posts</h3><ul class="related_post"><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/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/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><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/2008/01/18/wordpress-database-schema/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
	</channel>
</rss>

<!-- Served from: www.jayminkapish.com @ 2010-07-30 06:31:13 by W3 Total Cache -->