<?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</title>
	<atom:link href="http://www.jayminkapish.com/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>WordPress Instant Search Plugin</title>
		<link>http://www.jayminkapish.com/2010/09/30/wordpress-instant-search-plugin/</link>
		<comments>http://www.jayminkapish.com/2010/09/30/wordpress-instant-search-plugin/#comments</comments>
		<pubDate>Thu, 30 Sep 2010 20:09:58 +0000</pubDate>
		<dc:creator>Jaymin Patel</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[Wordpress Instant Search Plugin]]></category>

		<guid isPermaLink="false">http://www.jayminkapish.com/?p=294</guid>
		<description><![CDATA[Wordpress Instant Search Plugin looks for matched tags and categories on your blog and suggest to readers which improves search experiece.]]></description>
			<content:encoded><![CDATA[<div class="inline-block right"><div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#appId=187682461287759&amp;xfbml=1"></script><fb:like href="http://www.jayminkapish.com/2010/09/30/wordpress-instant-search-plugin/" send="false" layout="box_count" width="50" show_faces="false" font=""></fb:like>
<!-- Place this tag in your head or just before your close body tag -->
<script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>
<!-- Place this tag where you want the +1 button to render -->
<g:plusone size="tall"></g:plusone>
<a href="http://twitter.com/share" class="twitter-share-button" data-count="vertical" data-via="jayminkapish">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script><br />
<hr /><a href="http://wordpress.org/extend/plugins/wp-instant-search/" title="Download WordPress Instant Search Plugin">Download from WordPress.org</a><br />
<hr /><a href="http://www.maangchi.com/#s" title="Wordpress Instant Search Plugin Demo">See it live in action (Demo)</a></div>
<p>WordPress Instant Search Plugin looks for matched tags and categories on your blog and offers suggestions to readers which improves search experiece. Since WordPress searches into tags and categories for entered text, this plugin will let readers choose correct tag or category that match what they are looking for on your blog and WordPress will return very accurate results.</p>
<h5>Requirements</h5>
<ol>
<li>WordPress 2.9.2 Minimum</li>
<li>Search Template in your theme with input element id &#8220;s&#8221;. Example: &lt;input type=&quot;text&quot; value=&quot;&quot; name=&quot;s&quot; id=&quot;s&quot;&gt;</li>
<li>Make sure wp_head action hook is added within the &lt;head&gt;&lt;/head&gt; section of your active theme header.php template. If does not exist, add it right before &lt;/head&gt; in your active theme header.php template. Should look like this</li>
</ol>
<p><code>&lt;?php wp_head(); ?&gt;</code></p>
<h5>How Plugin Works</h5>
<ol>
<li>&lt;?php wp_head(); ?&gt; in your active theme header.php template will load required JavaScript files.</li>
<li>Plugin hooks in jQuery, jQuery Suggest and Instant Search JavaScript files within the &lt;head&gt;&lt;/head&gt; section of your active theme header.php template</li>
<li>As reader starts typing into Search box, jQuery triggers AJAX call to plugin</li>
<li>Plugin suggests tags and categories starting with entered text</li>
<li>Reader can select the suggested terms (tags and categories) to fill out the search box and hit Enter key</li>
</ol>
<h5>What&#8217;s coming next</h5>
<ol>
<li>Configuration Screen with option to load jQuery or not. You might already have jQuery loaded from Google or somewhere else, so you can check this option off if you do not want two jQuery loaded on the page.</li>
<li>Input boxes on Configuration Screen to change CSS (including properties like color, bgcolor of selected text or classes itself)</li>
<li>Options to expand auto suggest to Pages &#038; Posts Titles and Custom Taxonomies</li>
</ol>
<h5>Tweets</h5>
<ol>
<li>WP Instant Search &#8211; A plugin developed by New York Times blogs developer, <a href="http://twitter.com/jayminkapish">@jayminkapish</a> <a href="http://bit.ly/aasA1H">http://bit.ly/aasA1H</a> &#8212; <a href="http://twitter.com/silencematters">Jeremy Zilar</a> <em>(Blogs Specialist at The New York Times)</em></li>
<li>New WordPress plugin by <a href="http://twitter.com/nytimes">@nytimes</a> developer <a href="http://twitter.com/jayminkapish">@jayminkapish</a>: WP Instant Search <a href="http://db.ly/vy">http://db.ly/vy</a> &#8212; <a href="http://twitter.com/danielbachhuber">Daniel Bachhuber</a></li>
</ol>
<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 (0)</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 (9)</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! (22)</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.jayminkapish.com/2010/09/30/wordpress-instant-search-plugin/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>New WordPress Theme &#8211; Optimized and SEO Friendly</title>
		<link>http://www.jayminkapish.com/2010/08/20/new-wordpress-theme-optimized-and-seo-friendly/</link>
		<comments>http://www.jayminkapish.com/2010/08/20/new-wordpress-theme-optimized-and-seo-friendly/#comments</comments>
		<pubDate>Fri, 20 Aug 2010 14:01:35 +0000</pubDate>
		<dc:creator>Jaymin Patel</dc:creator>
				<category><![CDATA[HTML]]></category>
		<category><![CDATA[KAPISH]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[Yahoo!]]></category>
		<category><![CDATA[Apache mod_expire]]></category>
		<category><![CDATA[SlideDeck]]></category>
		<category><![CDATA[Wordpress Optimized and SEO Friendly Theme]]></category>
		<category><![CDATA[WPZoom]]></category>

		<guid isPermaLink="false">http://www.jayminkapish.com/?p=272</guid>
		<description><![CDATA[The New Wordpress Theme which is optimized and SEO friendly. Google Page Speed ranks it at 94/100.]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve subscribed to many Theme Blogs&#8217; RSS Feeds. They publish a few posts every week featuring WordPress Themes free as well as paid. And every time I take a look at new designs, I want something like that on my blog too!. I was used to design this blog theme every month and was not satisfied until now.</p>
<div class="inline-block right"><div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#appId=187682461287759&amp;xfbml=1"></script><fb:like href="http://www.jayminkapish.com/2010/09/30/wordpress-instant-search-plugin/" send="false" layout="box_count" width="50" show_faces="false" font=""></fb:like>
<!-- Place this tag in your head or just before your close body tag -->
<script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>
<!-- Place this tag where you want the +1 button to render -->
<g:plusone size="tall"></g:plusone>
<a href="http://twitter.com/share" class="twitter-share-button" data-count="vertical" data-via="jayminkapish">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div>
<p>Before I start designing this blog, I started taking notes from different blog themes. Mostly all themes have two and three columns layout which is very very common. My very first note was &#8220;I do not want two/three columns theme&#8221;. So I started designing HTML site with <a title="Thanks to SlideDeck for Slider" href="http://www.slidedeck.com/?ref=www.jayminkapish.com">SlideDeck</a> and <a href="http://code.google.com/webfonts" title="Google Fonts">Google Fonts API</a>. I started with index.html, single.html, 404.html, archive.html and search.html. I designed my logo which is also very simple and optimized for web.</p>
<p>When I had all HTML files ready, I started working on SEO. Remember!! Page Titles are so important? </p>
<p>I installed Google Page Speed and YSlow!. I mostly profile my html pages on Google Page Speed. </p>
<p>Google Page Speed highly recommends,</p>
<ol>
<li>One HTTP request for CSS</li>
<li>One HTTP request for JS</li>
<li>No whitespaces/empty lines in HTML</li>
<li>Compressed CSS and JS</li>
<li>Add Expiration Headers for JS and CSS</li>
</ol>
<p>I am using SlideDeck Slider so I had SlideDeck CSS and my theme CSS. How could you make one HTTP request for two different files? I could think of two options:</p>
<ol>
<li>Copy two files into one file and compress</li>
<li>Follow wp-admin/load-styles.php which reads so many files and compress them</li>
</ol>
<p>I chose second option because if I upgrade SlideDeck, I will have to do exercise again. With the second option, I can just drop the file at the correct location and I&#8217;m done. I did same thing with JS files too which reads jQuery, Google Analytics and some JS code that I wrote to support this theme.</p>
<p>I also added mod_expire lines in my .htaccess file that tells browsers to load resources (CSS/JS/Graphics from cache if not expired). Google recommends expiration should be at least 1 week.</p>
<p><code><br />
#Expiration<br />
&lt;ifmodule mod_expires.c&gt;<br />
ExpiresActive On<br />
ExpiresByType image/gif "access plus 1 week"<br />
ExpiresByType image/jpg "access plus 1 week"<br />
ExpiresByType image/png "access plus 1 week"<br />
ExpiresByType application/x-javascript "access plus 1 week"<br />
ExpiresByType text/css "access plus 1 week"<br />
ExpiresByType image/x-icon "access plus 1 week"<br />
&lt;/IfModule&gt;<br />
#End Expiration<br />
</code></p>
<p>I removed all white spaces and line breaks from my Theme files (Not sure how much that makes difference but will definitely reduce the size of the document). I also compressed JS/CSS using TextMate and YUI Compressor Bundle. I added alt text, height and width to all images I am using currently.</p>
<p>Compressing JS/CSS and one HTTP request for JS/CSS was helping a lot. After installing W3 Total Cache plugin, ranking went up and up.</p>
<p>My blog theme is not too heavy with loaded sidebars and fancy headers and footers but I smile when I see Google Page Speed Tool gives me 94 out of 100. </p>
<p>I want to thank the followings:</p>
<ol>
<li><a href="http://code.google.com/speed/page-speed/">Google Page Speed Tool</a></li>
<li><a href="http://developer.yahoo.com/yslow/">YSlow!</a></li>
<li><a href="http://wordpress.org/extend/plugins/w3-total-cache/">W3 Total Cache</a></li>
<li><a href="http://www.slidedeck.com/?ref=www.jayminkapish.com">SlideDeck</a></li>
<li><a href="http://www.wpzoom.com/">WPZoom</a></li>
<li><a href="http://www.wordpress.org/">WordPress</a></li>
</ol>
<p><em>If you like this theme, <a href="http://www.jayminkapish.com/contact-jaymin-patel/">contact me</a> and I will bundle it for you.</em></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! (22)</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 (9)</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.jayminkapish.com/2010/08/20/new-wordpress-theme-optimized-and-seo-friendly/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress MU: accessing blogs from dropdown in admin bar</title>
		<link>http://www.jayminkapish.com/2010/05/17/wordpress-mu-accessing-blogs-from-dropdown-in-admin-bar/</link>
		<comments>http://www.jayminkapish.com/2010/05/17/wordpress-mu-accessing-blogs-from-dropdown-in-admin-bar/#comments</comments>
		<pubDate>Mon, 17 May 2010 17:50:39 +0000</pubDate>
		<dc:creator>Jaymin Patel</dc:creator>
				<category><![CDATA[KAPISH]]></category>

		<guid isPermaLink="false">http://www.jayminkapish.com/?p=223</guid>
		<description><![CDATA[This code snippet adds list of blogs that user has access to on MU site. Blogname links to blog's wp-admin, saving you time while jumping between different blogs.]]></description>
			<content:encoded><![CDATA[<p><span id="more-223"></span>
<div class="phpcode"><code>function my_blogs_listing($actions) {<br />
global $current_user;<br />
$blogs = get_blogs_of_user( $current_user-&gt;ID );<br />
$actions["#"] = array("<span style="text-decoration: underline;"><strong>*** My Blogs ***</strong></span>", 'edit_dashboard');<br />
foreach ($blogs as $blog) {<br />
$actions["{$blog-&gt;siteurl}/wp-admin/"] = array($blog-&gt;blogname, 'level_7');<br />
}<br />
return $actions;<br />
}<br />
add_filter('favorite_actions', 'my_blogs_listing');<br />
</code></div>
<p>This code snippet (can be used as a plugin) adds list of blogs that user has access to on MU site. Blogname links to blog&#8217;s wp-admin, saving you time.</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! (22)</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 (9)</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.jayminkapish.com/2010/05/17/wordpress-mu-accessing-blogs-from-dropdown-in-admin-bar/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<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 [...]]]></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! (22)</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/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/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 (9)</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! (22)</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.jayminkapish.com/2009/12/08/secure-your-wordpress-installation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>I&#039;m attending WordCampNYC!</title>
		<link>http://www.jayminkapish.com/2009/11/03/im-attending-wordcampnyc/</link>
		<comments>http://www.jayminkapish.com/2009/11/03/im-attending-wordcampnyc/#comments</comments>
		<pubDate>Tue, 03 Nov 2009 18:44:50 +0000</pubDate>
		<dc:creator>Jaymin Patel</dc:creator>
				<category><![CDATA[KAPISH]]></category>

		<guid isPermaLink="false">http://blog.kapish.co.in/?p=192</guid>
		<description><![CDATA[I'm attending WordCampNYC!]]></description>
			<content:encoded><![CDATA[<p><center><a href="http://2009.newyork.wordcamp.org"  title="WordCampNYC – Nov 14-15"><img alt="WordCampNYC – Nov 14-15" src="http://2009.newyork.wordcamp.org/files/2009/10/wcnyc-attending-250.jpg" /></a></center></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! (22)</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 (9)</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.jayminkapish.com/2009/11/03/im-attending-wordcampnyc/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! (22)</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><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/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! (22)</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 (9)</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>1</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/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/08/secure-your-wordpress-installation/" title="Secure Your Wordpress Installation">Secure Your Wordpress Installation (0)</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 (9)</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! (22)</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>Date archive for a category</title>
		<link>http://www.jayminkapish.com/2009/06/16/date-archive-for-a-category/</link>
		<comments>http://www.jayminkapish.com/2009/06/16/date-archive-for-a-category/#comments</comments>
		<pubDate>Tue, 16 Jun 2009 16:52:53 +0000</pubDate>
		<dc:creator>Jaymin Patel</dc:creator>
				<category><![CDATA[KAPISH]]></category>
		<category><![CDATA[Date archive for a category]]></category>
		<category><![CDATA[wordpress archives for category]]></category>
		<category><![CDATA[wordpress-category-date-archive]]></category>

		<guid isPermaLink="false">http://blog.kapish.co.in/?p=78</guid>
		<description><![CDATA[How to build date archive for a category in wordpress.]]></description>
			<content:encoded><![CDATA[<p>There are a few ideas out there <strong>How to build date archive for a category</strong>. I am joining the race now.</p>
<p>Some of us, wordpress developers, may think this is hacky but I bet a few will like it this way because <strong>this works!</strong>.<br />
<span id="more-78"></span><br />
This idea would end up in url like this</p>
<div class="phpcode"><code>/archives/category/{category-slug}/yyyy/mm/</code></div>
<p>Lets get started and you can <a href="/wp-content/uploads/2009/06/date_archive_for_category.zip" title="Download php code - Date Archive for a category - wordpress">Download code here</a> and you can put that in your active theme&#8217;s functions.php file.</p>
<p>I am going to use <strong>init</strong> hook.</p>
<div class="phpcode">
<code>add_action('init','my_date_archive_for_category');</code>
</div>
<p>We can check if incoming request contains <strong>/archives/category/</strong> inside my_date_archive_for_category function. If it does, this is our category/date archive page.</p>
<p>Now breakup incoming request, and check every part of the request. We need category slug, year and month in place.</p>
<div class="phpcode">
<code>$request_parts = explode('/', $request);</code>
</div>
<p>Parts of request</p>
<div class="phpcode">
<code>Array ( [0] => [1] => archives [2] => category [3] => category-slug [4] => yyyy [5] => mm [6] => )</code>
</div>
<p>Here, we need to validate a few parts of the request like category slug, yyyy and mm.</p>
<div class="phpcode">
<code>$category_array = get_term_by('slug', $request_parts["3"], "category", ARRAY_A);</code>
</div>
<p>Now time to query wordpress.</p>
<div class="phpcode">
<code>query_posts(array('cat'=>$category_array["term_id"], 'year'=>$request_parts["4"], 'monthnum'=>$request_parts["5"]));</code>
</div>
<p>If we have posts, display them otherwise set a flag which we can use later to show 404 so visitors do not get confused.</p>
<div class="phpcode">
<code><br />
if ( have_posts() ) : while ( have_posts() ) : the_post();<br />
........<br />
endwhile;<br />
else:<br />
$is404 = true; /* set the flag so we know no posts found and display 404. */<br />
endif;<br />
</code>
</div>
<p><strong>DO NOT FORGET</strong> to put</p>
<div class="phpcode">
<code>exit;</code>
</div>
<p>at the end.</p>
<p>Putting <strong>exit</strong> at the end will end further PHP execution on your blog.</p>
<p>Do not forget to let me know how this works on your blog.</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! (22)</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 (9)</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.jayminkapish.com/2009/06/16/date-archive-for-a-category/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
	</channel>
</rss>

<!-- Served from: www.jayminkapish.com @ 2012-02-06 02:54:12 by W3 Total Cache -->
