<?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>Design Gala &#187; Anish Lama</title>
	<atom:link href="http://designgala.com/author/anish/feed/" rel="self" type="application/rss+xml" />
	<link>http://designgala.com</link>
	<description>Web Usability, Web Technology, User Experience</description>
	<lastBuildDate>Wed, 02 May 2012 03:55:38 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Top 5 Plugins to Build Contact Form for WordPress</title>
		<link>http://designgala.com/top-5-plugins-to-build-contact-form-for-wordpress/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=top-5-plugins-to-build-contact-form-for-wordpress</link>
		<comments>http://designgala.com/top-5-plugins-to-build-contact-form-for-wordpress/#comments</comments>
		<pubDate>Fri, 02 Mar 2012 12:04:52 +0000</pubDate>
		<dc:creator>Anish Lama</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[contact form]]></category>
		<category><![CDATA[plugin]]></category>

		<guid isPermaLink="false">http://designgala.com/?p=2762</guid>
		<description><![CDATA[Each site needs a contact form, or a form to communicate with site owner and the user of site. Being WordPress developer, I&#8217;ve been like an ostrich while using contact forms for the...]]></description>
			<content:encoded><![CDATA[<p>Each site needs a contact form, or a form to communicate with site owner and the user of site. Being WordPress developer, I&#8217;ve been like an ostrich while using contact forms for the client&#8217;s projects. In early days of my career, I always used <a href="http://www.deliciousdays.com/cforms-plugin/" target="_blank">CformsII</a>, and then I started using <a href="http://wordpress.org/extend/plugins/contact-form-7/" target="_blank">Contact Form 7</a>. Now, it has been shifted to Gravity Forms (Premium). Its own preferences and each of them have their own pros and cons. Here are list of top 5 contact form plugins to use.</p>
<h2>CformsII</h2>
<p><a href="http://www.deliciousdays.com/cforms-plugin/" target="_blank">CformsII</a>CFormsII is a contact form that has an incredible amount of features and is very customizable. CFromsII offers lots of features. And some of the unique and notable features are “tell a friend” functionality, database tracking of submitted data, backup &#038; restore, submission limitations (for registration etc) and widget support. </p>
<h2>Contact Form 7</h2>
<p><a href="http://wordpress.org/extend/plugins/contact-form-7/" target="_blank">Contact Form 7</a> can manage multiple contact forms, plus you can customize the form and the mail contents flexibly with simple markup. The form supports Ajax-powered submitting, CAPTCHA, Akismet spam filtering and so on.<br />
<img src="http://designgala.com/wp-content/uploads/2012/03/contact-form-7.png" alt="" title="contact-form-7" width="530" height="530" class="aligncenter size-full wp-image-2763" /></p>
<h2>Fast Secure Contact Form</h2>
<p><a href="http://wordpress.org/extend/plugins/si-contact-form/" target="_blank">Fast Secure Contact Form</a> lets site visitors send a quick E-mail message. It claims to blocks all common spammer tactics. Includes a CAPTCHA and Akismet support. Additionally, the plugin has a multi-form feature, optional extra fields, and an option to redirect visitors to any URL after the message is sent. Very much customizable.</p>
<p><img src="http://designgala.com/wp-content/uploads/2012/03/si-contact-form.jpg" alt="" title="si-contact-form" width="510" height="755" class="aligncenter size-full wp-image-2764" /></p>
<h2>Contact Me</h2>
<p>The quickest and easiest way to put a contact form on your WordPress blog. Use the <a href="http://wordpress.org/extend/plugins/contactme/" target="_blank">ContactMe</a> button and contact form to turn visitors into customers. Visitors click eye-catching ContactMe button. The button opens a contact form in popup.<br />
<img src="http://designgala.com/wp-content/uploads/2012/03/contact-me.png" alt="" title="contact-me" width="507" height="508" class="aligncenter size-full wp-image-2765" /></p>
<h2>Tiny Contact Form</h2>
<p><a href="http://wordpress.org/extend/plugins/tiny-contact-form/" target="_blank">Tiny Contact Form</a> is minimalist form that allows site visitors to contact you by email.</p>
<p>Did I missed any best ones? Please share which ones are your bests.</p>
<div id="fb-root"></div>
<p><script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><!-- Do not remove --></p>
]]></content:encoded>
			<wfw:commentRss>http://designgala.com/top-5-plugins-to-build-contact-form-for-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Get Twitter Follower Count in WordPress?</title>
		<link>http://designgala.com/how-to-get-twitter-follower-count-in-wordpress/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-to-get-twitter-follower-count-in-wordpress</link>
		<comments>http://designgala.com/how-to-get-twitter-follower-count-in-wordpress/#comments</comments>
		<pubDate>Sun, 07 Feb 2010 13:45:45 +0000</pubDate>
		<dc:creator>Anish Lama</dc:creator>
				<category><![CDATA[How to]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://www.designgala.com/?p=1832</guid>
		<description><![CDATA[I am neither the first nor the last one that will be writing about placing twitter follower counter in webpage. Though there already exist many widgets anyone can easily use and customize; see...]]></description>
			<content:encoded><![CDATA[<p>I am neither the first nor the last one that will be writing about placing twitter follower counter in webpage. Though there already exist many widgets anyone can easily use and customize; see <a href="http://twittercounter.com/">here</a> and <a href="http://www.widgetbox.com/widget/chris-count-chriscount-on-twitter">here</a>; But those widgets have limited options in terms of color, layout and moreover they have their info attched (somewhere) in widget which does not feels good. Here&#8217;s my attempt on how to get follower count in twitter using PHP.</p>
<p><img class="alignright size-full wp-image-1834" title="twitter pool" src="http://www.designgala.com/wp-content/uploads/2010/02/twitter_pool.jpg" alt="" width="500" /></p>
<p><span id="more-1832"></span></p>
<p><strong>Step 1:</strong><br />
We will create a PHP file; lets say <strong>follower_count.php</strong> or whatever you&#8217;d like to name it. Then simply put following contents in that page.</p>
<div class="wp_syntax">
<div class="code">
<pre class="php" style="font-family:monospace;"><span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span>?php
<span style="color: #000088;">$twitter_username</span>	<span style="color: #339933;">=</span>	<span style="color: #0000ff;">'designgala'</span><span style="color: #339933;">;</span>	<span style="color: #666666; font-style: italic;">// please replace it with your twitter username</span>
<span style="color: #000088;">$tw</span>	<span style="color: #339933;">=</span>	get_option<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;total_twitter_followers&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$tw</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'lastcheck'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span> <span style="color: #009900;">&#40;</span> <span style="color: #990000;">mktime</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> – <span style="color: #cc66cc;">3600</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> 	<span style="color: #000088;">$xml</span>	<span style="color: #339933;">=</span>	<span style="color: #990000;">file_get_contents</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'http://twitter.com/users/show.xml?screen_name='</span><span style="color: #339933;">.</span> <span style="color: #000088;">$twitter_username</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">preg_match</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'/followers_count&amp;gt;(.*)</span></pre>
</div>
</div>
<p><strong>Explanation:</strong><br />
I used 2 PHP functions <strong><em><a href="http://php.net/manual/en/function.file-get-contents.php">file_get_contents()</a></em></strong> and <em><strong><a href="http://php.net/manual/en/function.preg-match.php">preg_match()</a></strong></em> here. file_get_contents fetches twitter xml file and stores in buffere while preg_match searches followers_count for a match in the buffer returned by earlier function.</p>
<p><strong>Step 2:</strong><br />
Now you can include above file using PHP include like below in any template file.</p>
<div class="wp_syntax">
<div class="code">
<pre class="php" style="font-family:monospace;"><span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span>?php <span style="color: #b1b100;">include</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;follower_count.php&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> ?<span style="color: #339933;">&amp;</span>gt<span style="color: #339933;">;</span></pre>
</div>
</div>
<p>Thats it. It will show twitter follower count.</p>
<p>[Photo Credit: <a href="http://www.flickr.com/photos/javajunky/4331986096/in/pool-twitter">JavaJunky</a> via Flickr]
<div id="fb-root"></div>
<p><script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><!-- Do not remove --></p>
]]></content:encoded>
			<wfw:commentRss>http://designgala.com/how-to-get-twitter-follower-count-in-wordpress/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>7 Best WordPress Plugins I Frequently use</title>
		<link>http://designgala.com/7-best-wordpress-plugins-i-frequently-use/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=7-best-wordpress-plugins-i-frequently-use</link>
		<comments>http://designgala.com/7-best-wordpress-plugins-i-frequently-use/#comments</comments>
		<pubDate>Thu, 04 Feb 2010 09:00:24 +0000</pubDate>
		<dc:creator>Anish Lama</dc:creator>
				<category><![CDATA[Reviews]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[review]]></category>

		<guid isPermaLink="false">http://www.designgala.com/?p=1659</guid>
		<description><![CDATA[Easy availability of thousands of Plugins and support are one of the reason behind success of WordPress. In case if you find trouble with then don&#8217;t panic because there are hundred thousands of...]]></description>
			<content:encoded><![CDATA[<p>Easy availability of thousands of Plugins and support are one of the reason behind success of WordPress. In case if you find trouble with then don&#8217;t panic because there are hundred thousands of developers for your support via forums, blog posts. But wait, there are thousands of plugins in <a href="http://wordpress.org/extend/plugins/">WordPress Plugin directory</a>; Do you need them all? Simple answer is <strong>NO</strong>. The selection of plugin depends on the requirement of the project. For e.g; I use <a href="http://www.webmaster-source.com/wp125-ad-plugin-wordpress/">WP125 plugin</a> for ads et cetera.</p>
<p>I am making a list of plugins that I use frequently in my most of the projects and recommend buyers to use.</p>
<p><img class="alignright size-full wp-image-1721" title="stuffs from WordCamp" src="http://www.designgala.com/wp-content/uploads/2010/02/from-wordcamp.jpg" alt="" style="width:530px" /></p>
<p><span id="more-1659"></span></p>
<p><strong>1. <a href="http://akismet.com/download/">Akismet</a></strong><br />
Do you often hit by spam? No worries Akismet is a saviour. <a href="http://akismet.com/download/">Akismet</a> protects your site against comment spam.  Activate this plugin and you won’t need to moderate or captcha your comment submissions.  Akismet does 99% of the work for you. In order to make this plugin work, you need <a href="http://wordpress.com/api-keys/">Akismet Key</a> which is easily available.</p>
<p><strong>2. <a href="http://wordpress.org/extend/plugins/all-in-one-seo-pack/">All-in-One SEO</a> for Search Engine Optimization</strong></p>
<p>Permalink feature of WordPress makes itself SEO friendly platform. Similarly most WordPress themes are built in SEO friendly manner. But again it is better to use AIOSEO which gives complete control over meta tags and title of the page.</p>
<p><strong>3. <a href="http://wordpress.org/extend/plugins/cforms/">Cforms</a></strong><br />
Almost all project needs contact forms, survey, input from reader; CForms makes life easier to integrate forms.<br />
<blockquote>CformsII offers unparalleled flexibility in deploying contact forms across your blog. Features include: comprehensive SPAM protection, Ajax support, Backup &amp; Restore, Multi-Recipients, Role Manager support, Database tracking and many more.</p></blockquote>
<p><strong>4. </strong><a href="http://www.webmaster-source.com/wp125-ad-plugin-wordpress/"><strong>WP125</strong></a></p>
<p>If you need to put advertisement widgets in your page then WP125 is an option for you. It supports an image ad of 125&#215;125 px. The interface to manage ads is very clean and easy to understand. Further statistics about ads clicks can also be viewed. Its only drawback is; there&#8217;s no support for text ads and ads with other sizes.</p>
<p><strong>5. </strong><a href="http://wordpress.org/extend/plugins/wp-dbmanager/"><strong>WP-DBManager</strong></a><br />
DB is always the most important asset of your website. This little gem is amazing for backing up your website. It actually has quite a few functions that it can perform but perhaps it’s most impressive feature is it’s ability to email the entire WordPress databse to me every day.</p>
<p><strong>6. <a href="http://wordpress.org/extend/plugins/wp-super-cache/">WP Super Cache</a></strong><br />
This plugin generates static html files from your WordPress powered website. After a html file is generated then webserver will will serve that static file instead of processing the comparatively more heavier and expensive WordPress scripts. It reduces database connection overhead as well. So if you&#8217;re getting heavy traffic to your site; consider using this.</p>
<p><strong>7. <a href="http://wordpress.org/extend/plugins/yet-another-related-posts-plugin/">YARPP Related Posts</a></strong> &#8211;  to increase Pageviews and guide readers for possible suggestion<br />
Yet Another Related Posts Plugin (YARPP) automatically scout out other posts on your site that are related to the post being read. YARPP lists related posts at the end of the post being read.</p>
<p>There are many other plugins which are as better than the plugin I listed above.
<div id="fb-root"></div>
<p><script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><!-- Do not remove --></p>
]]></content:encoded>
			<wfw:commentRss>http://designgala.com/7-best-wordpress-plugins-i-frequently-use/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Simple Trick to Hide Tags, Comments widgets from WP-admin Add/Edit Post</title>
		<link>http://designgala.com/simple-trick-to-hide-tags-comments-widgets-from-wp-admin-addedit-post/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=simple-trick-to-hide-tags-comments-widgets-from-wp-admin-addedit-post</link>
		<comments>http://designgala.com/simple-trick-to-hide-tags-comments-widgets-from-wp-admin-addedit-post/#comments</comments>
		<pubDate>Sun, 31 Jan 2010 17:20:18 +0000</pubDate>
		<dc:creator>Anish Lama</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[hide widgets]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://www.designgala.com/?p=1522</guid>
		<description><![CDATA[I wasn&#8217;t surprised when one of my buyer asked me if there&#8217;s a way to hide features like tags, comments widgets. Its not uncommon in a simple CMS based projects where tags and...]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-full wp-image-1523" title="wp admin widget hidden" src="http://www.designgala.com/wp-content/uploads/2010/01/wp-admin-widget-hidden.jpg" alt="" width="550" height="388" />I wasn&#8217;t surprised when one of my buyer asked me if there&#8217;s a way to hide features like tags, comments widgets. Its not uncommon in a simple CMS based projects where tags and comments widgets are seldom needed. Hence, I came up with a simple trick to hide those widgets.</p>
<p><img class="alignright size-full wp-image-1524" title="wp admin add interface" src="http://www.designgala.com/wp-content/uploads/2010/01/wp-admin-add-interface.jpg" alt="" width="550" height="318" />Basically I used help of CSS <em>&#8216;display:none&#8217;</em> to achieve it. I created a function <em>&#8216;hide_wp_tags_from_admin&#8217;</em> and then I added this filter to to admin head using <a href="http://codex.wordpress.org/Function_Reference/add_action">add_action</a>. You must either create a plugin and add it to plugins folder or you can use a quick dirty hack by adding below function to <em>function.php</em> of your <em>active theme</em>.</p>
<div class="wp_syntax">
<div class="code">
<pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> hide_wp_tags_from_admin<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;!--
#commentsdiv, #tagsdiv-post_tag { display:none; }
--&gt;'</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
add_action<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'admin_head'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'hide_wp_tags_from_admin'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre>
</div>
</div>
<p>Very simple; isn&#8217;t it? Have your say.
<div id="fb-root"></div>
<p><script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><!-- Do not remove --></p>
]]></content:encoded>
			<wfw:commentRss>http://designgala.com/simple-trick-to-hide-tags-comments-widgets-from-wp-admin-addedit-post/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>Darn you WordPress AutoP Filter – How to disable AutoP?</title>
		<link>http://designgala.com/darn-you-wordpress-autop-filter-how-to-disable-autop/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=darn-you-wordpress-autop-filter-how-to-disable-autop</link>
		<comments>http://designgala.com/darn-you-wordpress-autop-filter-how-to-disable-autop/#comments</comments>
		<pubDate>Wed, 25 Nov 2009 20:54:44 +0000</pubDate>
		<dc:creator>Anish Lama</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://www.designgala.com/?p=489</guid>
		<description><![CDATA[WordPress automatically adds &#60;p&#62; tag for each line breaks within a post or page. For some, this filter can be a headache for their particular project. I quickly googled and fixed it by...]]></description>
			<content:encoded><![CDATA[<p>WordPress automatically adds &lt;p&gt; tag for each line breaks within a post or page. For some, this filter can be a headache for their particular project. <img src="http://www.designgala.com/wp-content/uploads/thumb/thumb_wplogo-stacked-rgb-300x186.png" alt="" /></p>
<h3><strong>I quickly googled and fixed it by adding following code in function.php</strong></h3>
<div class="wp_syntax">
<div class="code">
<pre class="php" style="font-family:monospace;">remove_filter<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'the_content'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'wpautop'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre>
</div>
</div>
<p>;)
<div id="fb-root"></div>
<p><script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><!-- Do not remove --></p>
]]></content:encoded>
			<wfw:commentRss>http://designgala.com/darn-you-wordpress-autop-filter-how-to-disable-autop/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How to Exclude Categories from RSS Feed in WordPress</title>
		<link>http://designgala.com/how-to-exclude-categories-from-rss-feed-in-wordpress/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-to-exclude-categories-from-rss-feed-in-wordpress</link>
		<comments>http://designgala.com/how-to-exclude-categories-from-rss-feed-in-wordpress/#comments</comments>
		<pubDate>Sat, 14 Nov 2009 23:30:23 +0000</pubDate>
		<dc:creator>Anish Lama</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[hack]]></category>

		<guid isPermaLink="false">http://www.designgala.com/?p=392</guid>
		<description><![CDATA[Last week I wrote about how to disable WordPress RSS feed completely from end users. Sometimes there are cases where we want posts from certain categories not to publish in RSS feed; we...]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.designgala.com/wp-content/uploads/2009/11/wplogo-stacked-rgb-300x186.png" alt="wplogo-stacked-rgb" title="wplogo-stacked-rgb" width="300" height="186" class="alignright size-medium wp-image-411" />Last week I wrote about <a href="http://www.designgala.com/an-easy-hack-to-disable-rss-feeds-in-wordpress/" title="how to disable WordPress RSS feed completely">how to disable WordPress RSS feed completely</a> from end users. Sometimes there are cases where we want posts from certain categories not to publish in RSS feed; we just wish to unpublish post in feed.</p>
<p>There are 2 ways to disable categories in feeds.</p>
<h3><strong>1. If you&#8217;re a feedburner user</strong></h3>
<p>You&#8217;ll have to edit the original feed source in your feedburner account like below;</p>
<p>http://designgala.com/feed?cat=-7&#038;cat=-18</p>
<p>Above URL would exclude posts from categories with ID 7 and 18</p>
<h3><strong>2. From standard RSS feed</strong></h3>
<p>In order to use this method, you need to add following code in function.php of your active theme.</p>
<div class="wp_syntax">
<div class="code">
<pre class="php" style="font-family:monospace;"><span style="color: #009933; font-style: italic;">/**
* disable RSS feed
*/</span>
<span style="color: #000000; font-weight: bold;">function</span> exclude_categories_in_feed<span style="color: #009900;">&#40;</span><span style="color: #000088;">$query</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$query</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">is_feed</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000088;">$query</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">set</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'cat'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'-7,-18'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">return</span> <span style="color: #000088;">$query</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
add_filter<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'pre_get_posts'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'exclude_categories_in_feed'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre>
</div>
</div>
<p>I hope this was short but cool wordpress hack to exclude categories from RSS feed.
<div id="fb-root"></div>
<p><script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><!-- Do not remove --></p>
]]></content:encoded>
			<wfw:commentRss>http://designgala.com/how-to-exclude-categories-from-rss-feed-in-wordpress/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>An easy Hack to Disable RSS feeds in WordPress</title>
		<link>http://designgala.com/an-easy-hack-to-disable-rss-feeds-in-wordpress/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=an-easy-hack-to-disable-rss-feeds-in-wordpress</link>
		<comments>http://designgala.com/an-easy-hack-to-disable-rss-feeds-in-wordpress/#comments</comments>
		<pubDate>Sat, 07 Nov 2009 17:51:37 +0000</pubDate>
		<dc:creator>Anish Lama</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[disable rss feeds]]></category>
		<category><![CDATA[hack]]></category>

		<guid isPermaLink="false">http://www.designgala.com/?p=344</guid>
		<description><![CDATA[RSS feed is one of the best feature of WordPress for sharing post. But there are cases where feeds either have little importantce or does not have any roles to play as in...]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.designgala.com/wp-content/uploads/2009/11/disable_rss_wordpress.jpg" alt="disable rss wordpress" title="disable rss wordpress" class="alignright size-full wp-image-346" />RSS feed is one of the best feature of WordPress for sharing post. But there are cases where feeds either have little importantce or does not have any roles to play as in static websites, CMS. For all who do not need RSS feature in WordPress it can be disabled with a little effort.</p>
<h3><strong>Step 1:</strong></h3>
<p>Create a new function in <em>function.php</em> located in your active theme folder like below:</p>
<div class="wp_syntax">
<div class="code">
<pre class="php" style="font-family:monospace;"><span style="color: #009933; font-style: italic;">/**
* disable RSS feed
*/</span>
<span style="color: #000000; font-weight: bold;">function</span> wp_disable_feed<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
   wp_die<span style="color: #009900;">&#40;</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Sorry, no feeds available, return to &lt;a href=&quot;'</span><span style="color: #339933;">.</span> get_bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'url'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span><span style="color: #0000ff;">'&quot;&gt;homepage&lt;/a&gt;'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
add_action<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'do_feed'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'wp_disable_feed'</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
add_action<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'do_feed_rdf'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'wp_disable_feed'</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
add_action<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'do_feed_rss'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'wp_disable_feed'</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
add_action<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'do_feed_rss2'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'wp_disable_feed'</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
add_action<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'do_feed_atom'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'wp_disable_feed'</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre>
</div>
</div>
<p>I told you. Its very easy to disable feeds.</p>
<div id="fb-root"></div>
<p><script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><!-- Do not remove --></p>
]]></content:encoded>
			<wfw:commentRss>http://designgala.com/an-easy-hack-to-disable-rss-feeds-in-wordpress/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How to expand collapse (toggle) div layer using jQuery</title>
		<link>http://designgala.com/how-to-expand-collapse-toggle-div-layer-using-jquery/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-to-expand-collapse-toggle-div-layer-using-jquery</link>
		<comments>http://designgala.com/how-to-expand-collapse-toggle-div-layer-using-jquery/#comments</comments>
		<pubDate>Thu, 05 Nov 2009 19:34:01 +0000</pubDate>
		<dc:creator>Anish Lama</dc:creator>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[expand-collapse]]></category>
		<category><![CDATA[toggle layer]]></category>

		<guid isPermaLink="false">http://www.designgala.com/?p=331</guid>
		<description><![CDATA[Quite often; in most of my projects, I have been using jQuery to toggle the layer. So, I thought of sharing how easy it is to expand div layer and collapse panel using jQuery. When user clicks on the header, the content gets displayed by sliding down and when you again click on the header, the content collapses.]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.designgala.com/wp-content/uploads/2009/11/collapse-expand-jquery.jpg" alt="collapse expand jquery" title="collapse expand jquery" class="aligncenter size-full wp-image-337" /> In almost all of my projects, I have been using <a href="http://jquery.com/">jQuery</a> to toggle the layer. So, I thought of sharing how easy it is to expand div layer and collapse panel using jQuery. When user clicks on the header, the content gets displayed by sliding down and when you again click on the header, the content collapses.</p>
<h3><strong>Step 1:</strong></h3>
<p>Include jQuery Library in head section of your html file.</p>
<div class="wp_syntax">
<div class="code">
<pre class="javascript" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text/javascript&quot;</span> src<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js&quot;</span><span style="color: #339933;">&gt;&lt;/</span>script<span style="color: #339933;">&gt;</span></pre>
</div>
</div>
<h3><strong>Step 2:</strong></h3>
<p>Come up with your own html elements in body section. I chose div &#8216;layer1&#8242; to be the main container where collapsible/expandable content would reside.</p>
<p>Next, class &#8216;heading&#8217; is given to header while div &#8216;content&#8217; holds the show hide layer for that heading</p>
<p><strong>Like this:</strong></p>
<div class="wp_syntax">
<div class="code">
<pre class="html" style="font-family:monospace;">&lt;div class=&quot;layer1&quot;&gt;
&lt;p class=&quot;heading&quot;&gt;Header-1 &lt;/p&gt;
&lt;div class=&quot;content&quot;&gt;Lorem ipsum dolor sit amet, consectetuer adipiscing elit orem ipsum dolor sit amet, consectetuer adipiscing elit&lt;/div&gt;
&lt;p class=&quot;heading&quot;&gt;Header-2&lt;/p&gt;
&lt;div class=&quot;content&quot;&gt;Lorem ipsum dolor sit amet, consectetuer adipiscing elit orem ipsum dolor sit amet, consectetuer adipiscing elit&lt;/div&gt;
&lt;p class=&quot;heading&quot;&gt;Header-3&lt;/p&gt;
&lt;div class=&quot;content&quot;&gt;Lorem ipsum dolor sit amet, consectetuer adipiscing elit orem ipsum dolor sit amet, consectetuer adipiscing elit&lt;/div&gt;
&lt;/div&gt;</pre>
</div>
</div>
<h3><strong>Step 3: </strong></h3>
<p>CSS: Now it totally depends on you to write css for your heading, div. Here&#8217;s my version of CSS for this example.</p>
<div class="wp_syntax">
<div class="code">
<pre class="css" style="font-family:monospace;"><span style="color: #6666ff;">.layer1</span> <span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">500px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #6666ff;">.heading</span> <span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #933;">1px</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#fff</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #933;">3px</span> <span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">cursor</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">pointer</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">relative</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">background-color</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#c30</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
.<span style="color: #000000; font-weight: bold;">content</span> <span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #933;">5px</span> <span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">background-color</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#fafafa</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
p <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #933;">5px</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span></pre>
</div>
</div>
<h3><strong>Step 4: </strong></h3>
<p>Again lets go to head section to add few more javascript codes.</p>
<div class="wp_syntax">
<div class="code">
<pre class="javascript" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text/javascript&quot;</span><span style="color: #339933;">&gt;</span>
jQuery<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">ready</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  jQuery<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;.content&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">hide</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #006600; font-style: italic;">//toggle the componenet with class msg_body</span>
  jQuery<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;.heading&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">click</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
  <span style="color: #009900;">&#123;</span>
    jQuery<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">next</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;.content&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">slideToggle</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">500</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span></pre>
</div>
</div>
<p>Thats it!! Expandible-Collapsible panel is ready. You may like to view a <a href="http://www.designgala.com/demos/collapse-expand-jquery.html" target="_blank">DEMO</a>.
<div id="fb-root"></div>
<p><script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><!-- Do not remove --></p>
]]></content:encoded>
			<wfw:commentRss>http://designgala.com/how-to-expand-collapse-toggle-div-layer-using-jquery/feed/</wfw:commentRss>
		<slash:comments>98</slash:comments>
		</item>
		<item>
		<title>5 Cool Video plugins for WordPress</title>
		<link>http://designgala.com/5-cool-video-plugins-for-wordpress/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=5-cool-video-plugins-for-wordpress</link>
		<comments>http://designgala.com/5-cool-video-plugins-for-wordpress/#comments</comments>
		<pubDate>Tue, 20 Oct 2009 14:27:58 +0000</pubDate>
		<dc:creator>Anish Lama</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[embed video]]></category>
		<category><![CDATA[Plugins]]></category>

		<guid isPermaLink="false">http://www.designgala.com/?p=222</guid>
		<description><![CDATA[I was just checking in for WordPress plugin for embedding video for one of my client. And I came with the following cool plugin list. All of these plugin allows to embed videos...]]></description>
			<content:encoded><![CDATA[<p>I was just checking in for WordPress plugin for embedding video for one of my client. And I came with the following <a href="http://thenextweb.com/2009/01/13/10-cool-video-plugins-for-wordpress/">cool plugin list</a>. All of these plugin allows to embed videos from sites like YouTube, Google Video, Vimeo, Metacafe and many others; in very easy way.</p>
<h3><strong>1. Viper&#8217;s Video Quicktags</strong></h3>
<p><a href="http://www.designgala.com/wp-content/uploads/2009/10/vipers_video.png"><img src="http://www.designgala.com/wp-content/uploads/2009/10/vipers_video-300x191.png" alt="vipers_video" title="vipers_video" width="300" height="191" class="alignleft size-medium wp-image-223" /></a>This plugin adds on new buttons to the rich text editor on WordPress.  In order to embed a video, you just need to paste the video URL into the prompt box. With this plugin you can also fully configure the width, height, colors and alignment on the page.</p>
<p>Download: <a href="http://wordpress.org/extend/plugins/vipers-video-quicktags/">http://wordpress.org/extend/plugins/vipers-video-quicktags/</a></p>
<h3><strong>2. FLV Embed</strong></h3>
<p><a href="http://www.designgala.com/wp-content/uploads/2009/10/flv_embed.png"><img src="http://www.designgala.com/wp-content/uploads/2009/10/flv_embed-150x150.png" alt="flv_embed" title="flv_embed" width="150" height="150" class="alignleft size-thumbnail wp-image-224" /></a>This plugin supports video sitemap generation,  includes options such as auto start and menu control bar. It also supports text only output for RSS that prompt readers to visit the original post for Flash content.</p>
<p>Download: <a href="http://wordpress.org/extend/plugins/flv-embed/">http://wordpress.org/extend/plugins/flv-embed/</a></p>
<h3><strong>3. Interactive Video Plugin</strong></h3>
<p><a href="http://www.designgala.com/wp-content/uploads/2009/10/interactive_video.jpg"><img src="http://www.designgala.com/wp-content/uploads/2009/10/interactive_video-289x300.jpg" alt="interactive video" title="interactive video" width="289" height="300" class="alignleft size-medium wp-image-225" /></a> Apart from video embed this plugin also includes the ability to upload/ record/import videos directly to your post, edit and remix content with an online video editor. You can even enable video responses, manage and track your video content.</p>
<p>Includes custom sizing of the video player, advanced sharing options and allow readers and subscribers to add video and audio comments.</p>
<p>Download: <a href="http://wordpress.org/extend/plugins/kaltura-interactive-video/">http://wordpress.org/extend/plugins/kaltura-interactive-video/</a></p>
<h3><strong>4. Flash Video Player</strong></h3>
<p><a href="http://www.designgala.com/wp-content/uploads/2009/10/flash_video_player.png"><img src="http://www.designgala.com/wp-content/uploads/2009/10/flash_video_player-300x281.png" alt="flash_video_player" title="flash_video_player" width="300" height="281" class="alignleft size-medium wp-image-226" /></a> This plugin allows the addition of videos into WordPress by using a menu with post-level overrides for customization of size, background color etc. Give up your style wishes once, and you never ever have to manually style a video again.</p>
<p>Download: <a href="http://wordpress.org/extend/plugins/flash-video-player/">http://wordpress.org/extend/plugins/flash-video-player/</a></p>
<h3><strong>5. Video Embedder</strong></h3>
<p><a href="http://www.designgala.com/wp-content/uploads/2009/10/video_embedder.png"><img src="http://www.designgala.com/wp-content/uploads/2009/10/video_embedder-300x134.png" alt="video embedder" title="video embedder" width="300" height="134" class="alignleft size-medium wp-image-227" /></a>To embed a video using this plugin, all you need is the ID of the video. With this plugin you can manage the settings for all of your embedded movies from the WordPress settings for Video Embedder,  the properties for all the movies will be updated instantly as soon as you save the settings.</p>
<p>Download: <a href="http://wordpress.org/extend/plugins/video-embedder/">http://wordpress.org/extend/plugins/video-embedder/</a></p>
<p>Missed Any? Let us know.
<div id="fb-root"></div>
<p><script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><!-- Do not remove --></p>
]]></content:encoded>
			<wfw:commentRss>http://designgala.com/5-cool-video-plugins-for-wordpress/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Top Favorite WordPress SQL Hacks</title>
		<link>http://designgala.com/top-favorite-wordpress-sql-hacks/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=top-favorite-wordpress-sql-hacks</link>
		<comments>http://designgala.com/top-favorite-wordpress-sql-hacks/#comments</comments>
		<pubDate>Tue, 13 Oct 2009 01:21:58 +0000</pubDate>
		<dc:creator>Anish Lama</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[sql]]></category>

		<guid isPermaLink="false">http://www.designgala.com/?p=206</guid>
		<description><![CDATA[Whenever I work with WordPress and needed SQL hacks, have found this article very helpful. True said that there are cases when it becomes inevitable to run SQL queries directly to get things...]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-207" title="wordpress_sql_hacks" src="http://www.designgala.com/wp-content/uploads/2009/10/wordpress_sql_tips.jpg" alt="" width="225" />Whenever I work with WordPress and needed SQL hacks, have found <a href="http://www.smashingmagazine.com/2008/12/18/8-useful-wordpress-sql-hacks/">this article</a> very helpful. True said that there are cases when it becomes inevitable to run SQL queries directly to get things done despite of availability of many plugins.</p>
<p>Here are collection of my favorite WordPress SQL hacks.</p>
<h3><strong>1. Batch Delete Post Revisions:</strong></h3>
<p>Post revisions are very useful but they also increase the size of your MySQL database. You can manually delete revisions, but that&#8217;s very long and boring work.</p>
<p>SQL:</p>
<div class="wp_syntax">
<div class="code">
<pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">DELETE</span> <span style="color: #993333; font-weight: bold;">FROM</span> wp_posts <span style="color: #993333; font-weight: bold;">WHERE</span> post_type <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">&quot;revision&quot;</span>;</pre>
</div>
</div>
<h3><strong>2. Erase all Spam Comments:</strong></h3>
<p>Even though I have differnt plugins like AKismet, reCaptcha; I&#8217;ve always had very hard times dealing with spam. This solution made me very happy when I first used.</p>
<p>SQL:</p>
<div class="wp_syntax">
<div class="code">
<pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">DELETE</span> <span style="color: #993333; font-weight: bold;">FROM</span> wp_comments <span style="color: #993333; font-weight: bold;">WHERE</span> comment_approved <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'0'</span>;</pre>
</div>
</div>
<h3><strong>3. Manually Reset Your admin Password:</strong></h3>
<p>SQL:</p>
<div class="wp_syntax">
<div class="code">
<pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">UPDATE</span> <span style="color: #ff0000;">`wp_users`</span> <span style="color: #993333; font-weight: bold;">SET</span> <span style="color: #ff0000;">`user_pass`</span> <span style="color: #66cc66;">=</span> MD5<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'mypassword'</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">WHERE</span> <span style="color: #ff0000;">`wp_users`</span><span style="color: #66cc66;">.</span><span style="color: #ff0000;">`user_login`</span> <span style="color: #66cc66;">=</span><span style="color: #ff0000;">`admin`</span> <span style="color: #993333; font-weight: bold;">LIMIT</span> <span style="color: #cc66cc;">1</span>;</pre>
</div>
</div>
<h3><strong>4. Change Your WordPress Address:</strong></h3>
<p>I often use this hack very often. There are many cases when project development is done in demo site address. When we need to make it live; there&#8217;s already lots of data (testing + live) and its necessary to run following SQL to get things going.</p>
<p><strong>4.a. changes WordPress URL:</strong></p>
<div class="wp_syntax">
<div class="code">
<pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">UPDATE</span> wp_options <span style="color: #993333; font-weight: bold;">SET</span> option_value <span style="color: #66cc66;">=</span> <span style="color: #993333; font-weight: bold;">REPLACE</span><span style="color: #66cc66;">&#40;</span>option_value<span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'http://www.oldsite.com'</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'http://www.newsite.com'</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">WHERE</span> option_name <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'home'</span> <span style="color: #993333; font-weight: bold;">OR</span> option_name <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'siteurl'</span>;</pre>
</div>
</div>
<p><strong>4.b. Replace the relative URL (guid) of each post:</strong></p>
<div class="wp_syntax">
<div class="code">
<pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">UPDATE</span> wp_posts <span style="color: #993333; font-weight: bold;">SET</span> guid <span style="color: #66cc66;">=</span> <span style="color: #993333; font-weight: bold;">REPLACE</span><span style="color: #66cc66;">&#40;</span>guid<span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'http://www.oldsite.com'</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">'http://www.newsite.com'</span><span style="color: #66cc66;">&#41;</span>;</pre>
</div>
</div>
<p><strong>4.c. Search and replace in the wp_posts table to make sure that no absolute URL is still here:</strong></p>
<div class="wp_syntax">
<div class="code">
<pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">UPDATE</span> wp_posts <span style="color: #993333; font-weight: bold;">SET</span> post_content <span style="color: #66cc66;">=</span> <span style="color: #993333; font-weight: bold;">REPLACE</span><span style="color: #66cc66;">&#40;</span>post_content<span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'http://www.oldsite.com'</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'http://www.newsite.com'</span><span style="color: #66cc66;">&#41;</span>;</pre>
</div>
</div>
<p>We&#8217;re done changing WordPress Address. I am sure you do have your own collection of fav SQL hacks.
<div id="fb-root"></div>
<p><script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><!-- Do not remove --></p>
]]></content:encoded>
			<wfw:commentRss>http://designgala.com/top-favorite-wordpress-sql-hacks/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

