<?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>WPCookies &#187; How To&#8217;s</title>
	<atom:link href="http://www.wpcookies.com/category/how-to/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.wpcookies.com</link>
	<description>Wordpress Tips &#38; Tricks, Themes, Plugins, Showcase and more...</description>
	<lastBuildDate>Wed, 18 Aug 2010 08:10:40 +0000</lastBuildDate>
	
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>How to Disable Comments on All Posts in Wordpress</title>
		<link>http://www.wpcookies.com/how-to-disable-comments-on-all-posts-in-wordpress/</link>
		<comments>http://www.wpcookies.com/how-to-disable-comments-on-all-posts-in-wordpress/#comments</comments>
		<pubDate>Wed, 18 Aug 2010 08:10:40 +0000</pubDate>
		<dc:creator>Wordpress Chef</dc:creator>
				<category><![CDATA[How To's]]></category>

		<guid isPermaLink="false">http://www.wpcookies.com/?p=532</guid>
		<description><![CDATA[Just pass the following SQL query either from Terminal or Web Based Database Manager (phpMyAdmin)
UPDATE wp_posts SET comment_status = 'closed';
Thanks Jeff Starr for the tip.
]]></description>
			<content:encoded><![CDATA[<p>Just pass the following SQL query either from Terminal or Web Based Database Manager (phpMyAdmin)</p>
<pre class="brush: sql;">UPDATE wp_posts SET comment_status = 'closed';</pre>
<p>Thanks <strong><a href="http://digwp.com/2010/08/wordpress-sql-comments/" target="_blank">Jeff Starr</a></strong> for the tip.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wpcookies.com/how-to-disable-comments-on-all-posts-in-wordpress/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to Add Twitter Tweet Button on your Wordpress Blog</title>
		<link>http://www.wpcookies.com/how-to-add-twitter-tweet-button-on-your-wordpress-blog/</link>
		<comments>http://www.wpcookies.com/how-to-add-twitter-tweet-button-on-your-wordpress-blog/#comments</comments>
		<pubDate>Tue, 17 Aug 2010 07:28:57 +0000</pubDate>
		<dc:creator>Wordpress Chef</dc:creator>
				<category><![CDATA[How To's]]></category>
		<category><![CDATA[add tweet button]]></category>
		<category><![CDATA[tweet button for wordpress]]></category>
		<category><![CDATA[twitter tweet button]]></category>

		<guid isPermaLink="false">http://www.wpcookies.com/?p=521</guid>
		<description><![CDATA[1. Visit Twitter Tweet Button website.
2. Now choose your customized settings there such as buttons style, tweet text, URL and language.

3. Next option is to suggest Twitter accounts for follow, this is a really useful option which lets users to folllow the recommended twitter accounts after retweeting the link.

4. In the last step just copy [...]]]></description>
			<content:encoded><![CDATA[<p>1. Visit <strong><a href="http://twitter.com/tweetbutton">Twitter Tweet Button</a></strong> website.</p>
<p>2. Now choose your customized settings there such as buttons style, tweet text, URL and language.</p>
<p style="text-align: center;"><img class="alignnone size-full wp-image-523" title="tweet-button-01" src="http://www.wpcookies.com/wp-content/uploads/2010/08/tweet-button-01.gif" alt="Twitter Tweet Button" width="610" height="197" /></p>
<p>3. Next option is to suggest Twitter accounts for follow, this is a really useful option which lets users to folllow the recommended twitter accounts after retweeting the link.</p>
<p style="text-align: center;"><img class="alignnone size-full wp-image-524" title="tweet-button-02" src="http://www.wpcookies.com/wp-content/uploads/2010/08/tweet-button-02.gif" alt="Twitter Tweet Button on Wordpress Blog" width="610" height="197" /></p>
<p>4. In the last step just copy the code provided in the box.</p>
<p style="text-align: center;"><img class="alignnone size-full wp-image-525" title="tweet-button-03" src="http://www.wpcookies.com/wp-content/uploads/2010/08/tweet-button-03.gif" alt="How to Add Twitter Tweet Button" width="610" height="197" /></p>
<p>5. Now open <strong>single.php</strong> or any other file of your wordpress theme (can be in found wp-content/themes/) where you want the button to be visible, paste the code and save your modified file on the webserver.</p>
<p>Also checkout our tutorial on <a href="http://www.wpcookies.com/how-to-add-tweetmeme-button-on-your-wordpress-blog/">How to add TweetMeme Button on Wordpress blog</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wpcookies.com/how-to-add-twitter-tweet-button-on-your-wordpress-blog/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Allow Contributors to Upload Files in Wordpress</title>
		<link>http://www.wpcookies.com/how-to-allow-contributors-to-upload-files-in-wordpress/</link>
		<comments>http://www.wpcookies.com/how-to-allow-contributors-to-upload-files-in-wordpress/#comments</comments>
		<pubDate>Thu, 08 Apr 2010 10:37:37 +0000</pubDate>
		<dc:creator>Wordpress Chef</dc:creator>
				<category><![CDATA[How To's]]></category>

		<guid isPermaLink="false">http://www.wpcookies.com/?p=515</guid>
		<description><![CDATA[Open functions.php file of your theme and paste the following code:

if ( current_user_can('contributor') &#38;&#38; !current_user_can('upload_files') )
	add_action('admin_init', 'allow_contributor_uploads');

function allow_contributor_uploads() {
	$contributor = get_role('contributor');
	$contributor-&#62;add_cap('upload_files');
}

It will enable upload files feature for contributors.
This code was shared by Ryan Marganti
]]></description>
			<content:encoded><![CDATA[<p>Open <strong>functions.php</strong> file of your theme and paste the following code:</p>
<pre class="brush: php;">
if ( current_user_can('contributor') &amp;&amp; !current_user_can('upload_files') )
	add_action('admin_init', 'allow_contributor_uploads');

function allow_contributor_uploads() {
	$contributor = get_role('contributor');
	$contributor-&gt;add_cap('upload_files');
}
</pre>
<p>It will enable upload files feature for contributors.</p>
<p>This code was shared by <strong><a href="http://soulsizzle.com/quick-tips/allowing-wordpress-contributors-to-upload-files/" target="_blank">Ryan Marganti</a></strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.wpcookies.com/how-to-allow-contributors-to-upload-files-in-wordpress/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>How to Set Wordpress Post Expiration Date/Time</title>
		<link>http://www.wpcookies.com/how-to-set-wordpress-post-expiration-date-time/</link>
		<comments>http://www.wpcookies.com/how-to-set-wordpress-post-expiration-date-time/#comments</comments>
		<pubDate>Wed, 07 Apr 2010 06:40:41 +0000</pubDate>
		<dc:creator>Wordpress Chef</dc:creator>
				<category><![CDATA[How To's]]></category>

		<guid isPermaLink="false">http://www.wpcookies.com/?p=504</guid>
		<description><![CDATA[Set Wordpress Post Expiration with Date and Time
Open index.php file of your theme and replace the existing loop with:

&#60;?php
if (have_posts()) :
     while (have_posts()) : the_post();
         $expirationtime = get_post_custom_values('expiration');
         if (is_array($expirationtime)) {
     [...]]]></description>
			<content:encoded><![CDATA[<h2>Set Wordpress Post Expiration with Date and Time</h2>
<p>Open <strong>index.php</strong> file of your theme and replace the existing loop with:</p>
<pre class="brush: php;">
&lt;?php
if (have_posts()) :
     while (have_posts()) : the_post();
         $expirationtime = get_post_custom_values('expiration');
         if (is_array($expirationtime)) {
             $expirestring = implode($expirationtime);
         }

         $secondsbetween = strtotime($expirestring)-time();
         if ( $secondsbetween &gt; 0 ) {
             // Enter your post display code after that.
             the_title();
             the_excerpt();
             // Post display code ends here.
         }
     endwhile;
endif;
?&gt;
</pre>
<p>Now while creating a post to set it&#8217;s expiration date/time create a custom field with name(key) <strong>expiration</strong> and set your expiration time as value in this format <strong>mm/dd/yyyy 00:00:00</strong>.</p>
<p>Source: [<a href="http://www.wprecipes.com/how-to-set-post-expiration-datetime-on-your-wordpress-blog" target="_blank">WPRecipes</a>]</p>
<h2>Set Wordpress Post Expiration with Date</h2>
<p>Open <strong>index.php</strong> file of your theme and replace the existing loop with:</p>
<pre class="brush: php;">
&lt;?php
if (have_posts()) :
     while (have_posts()) : the_post();
	$currentdate = date(&quot;Ymd&quot;);
	$expirationdate = get_post_custom_values('expiration');
	if (is_null($expirationdate)) {
	$expirestring = '30005050'; //MAKE UN-EXPIRING POSTS ALWAYS SHOW UP;
	} else {

	if (is_array($expirationdate)) {
	$expirestringarray = implode($expirationdate);
	}
	$expirestring = str_replace(&quot;/&quot;,&quot;&quot;,$expirestringarray);
	} //else
	if ( $expirestring &gt; $currentdate ) {
             // Enter your post display code after that.
             the_title();
             the_excerpt();
             // Post display code ends here.
         }
     endwhile;
endif;
?&gt;
</pre>
<p>Now while creating a post to set it&#8217;s expiration date create a custom field with name(key) <strong>expiration</strong> and set your expiration date as value in this format <strong>yyy/mm/dd</strong>.</p>
<p>Source: [<a href="http://snipplr.com/view/3899/wordpress-post-expiration-code/" target="_blank">Snipplr</a>]</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wpcookies.com/how-to-set-wordpress-post-expiration-date-time/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How to Make a Post Sticky in Wordpress</title>
		<link>http://www.wpcookies.com/how-to-make-a-post-sticky-in-wordpress/</link>
		<comments>http://www.wpcookies.com/how-to-make-a-post-sticky-in-wordpress/#comments</comments>
		<pubDate>Mon, 05 Apr 2010 08:28:25 +0000</pubDate>
		<dc:creator>Wordpress Chef</dc:creator>
				<category><![CDATA[How To's]]></category>

		<guid isPermaLink="false">http://www.wpcookies.com/?p=495</guid>
		<description><![CDATA[Making a post stick on top in Wordpress is damn too simple and doesn&#8217;t need any coding.
While writing a post look for Publish module usually located at extreme right on the screen, click on the Edit link next to Visibility option there check &#8220;Stick this post to the front page&#8221; option and That&#8217;s it!
Checkout this [...]]]></description>
			<content:encoded><![CDATA[<p>Making a post stick on top in Wordpress is damn too simple and doesn&#8217;t need any coding.</p>
<p>While writing a post look for Publish module usually located at extreme right on the screen, click on the Edit link next to Visibility option there check &#8220;Stick this post to the front page&#8221; option and That&#8217;s it!</p>
<p>Checkout this screen cast video for better understanding:</p>
<div align="center">
<object width="560" height="340"><param name="movie" value="http://www.youtube.com/v/hXeR4jj7Pvs&#038;hl=en_US&#038;fs=1&#038;"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/hXeR4jj7Pvs&#038;hl=en_US&#038;fs=1&#038;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="560" height="340"></embed></object>
</div>
<p><strong>P.S.</strong> Sticky post feature was introduced in Wordpress 2.7, So you need to have Wordpress 2.7 or newer to use this feature.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wpcookies.com/how-to-make-a-post-sticky-in-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Display &#8220;Time Ago&#8221; for Posts and Comments</title>
		<link>http://www.wpcookies.com/how-to-display-time-ago-for-posts-and-comments/</link>
		<comments>http://www.wpcookies.com/how-to-display-time-ago-for-posts-and-comments/#comments</comments>
		<pubDate>Thu, 01 Apr 2010 08:35:42 +0000</pubDate>
		<dc:creator>Wordpress Chef</dc:creator>
				<category><![CDATA[How To's]]></category>

		<guid isPermaLink="false">http://www.wpcookies.com/?p=484</guid>
		<description><![CDATA[Open functions.php file of your theme and paste following code and Save:

function time_ago( $type = 'post' ) {
	$d = 'comment' == $type ? 'get_comment_time' : 'get_post_time';
	return human_time_diff($d('U'), current_time('timestamp')) . &#34; &#34; . __('ago');
}

Now place the following snippet in either single.php or comments.php (wherever you want to show it) within loop.

&#60;?php echo time_ago(); ?&#62;

Thanks to Chris [...]]]></description>
			<content:encoded><![CDATA[<p>Open <strong>functions.php</strong> file of your theme and paste following code and Save:</p>
<pre class="brush: php;">
function time_ago( $type = 'post' ) {
	$d = 'comment' == $type ? 'get_comment_time' : 'get_post_time';
	return human_time_diff($d('U'), current_time('timestamp')) . &quot; &quot; . __('ago');
}
</pre>
<p>Now place the following snippet in either<strong> single.php</strong> or <strong>comments.php</strong> (wherever you want to show it) within loop.</p>
<pre class="brush: php;">
&lt;?php echo time_ago(); ?&gt;
</pre>
<p>Thanks to <strong><a href="http://www.upthemes.com/2010/03/wordpress-master-tip-display-time-ago-for-posts-or-comments/" target="_blank">Chris</a></strong> for sharing this code.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wpcookies.com/how-to-display-time-ago-for-posts-and-comments/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Remove Wordpress Update Notice from Admin Panel</title>
		<link>http://www.wpcookies.com/remove-wordpress-update-notice-from-admin-panel/</link>
		<comments>http://www.wpcookies.com/remove-wordpress-update-notice-from-admin-panel/#comments</comments>
		<pubDate>Thu, 25 Mar 2010 12:04:35 +0000</pubDate>
		<dc:creator>Wordpress Chef</dc:creator>
				<category><![CDATA[How To's]]></category>

		<guid isPermaLink="false">http://www.wpcookies.com/?p=403</guid>
		<description><![CDATA[Open functions.php file of your theme and paste following code and Save:

if (!current_user_can('edit_users')) {
	add_action('init', create_function('$a', &#34;remove_action('init', 'wp_version_check');&#34;), 2);
	add_filter('pre_option_update_core', create_function('$a', &#34;return null;&#34;));
}

Thanks to Jeff for sharing this tip.
]]></description>
			<content:encoded><![CDATA[<p>Open <strong>functions.php</strong> file of your theme and paste following code and Save:</p>
<pre class="brush: php;">
if (!current_user_can('edit_users')) {
	add_action('init', create_function('$a', &quot;remove_action('init', 'wp_version_check');&quot;), 2);
	add_filter('pre_option_update_core', create_function('$a', &quot;return null;&quot;));
}
</pre>
<p>Thanks to <strong><a href="http://digwp.com/2010/03/wordpress-functions-php-template-custom-functions/" target="_blank">Jeff</a></strong> for sharing this tip.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wpcookies.com/remove-wordpress-update-notice-from-admin-panel/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How to Change Wordpress Admin Password Using SQL Query</title>
		<link>http://www.wpcookies.com/how-to-change-wordpress-admin-password-using-sql-query/</link>
		<comments>http://www.wpcookies.com/how-to-change-wordpress-admin-password-using-sql-query/#comments</comments>
		<pubDate>Wed, 17 Mar 2010 12:00:32 +0000</pubDate>
		<dc:creator>Wordpress Chef</dc:creator>
				<category><![CDATA[How To's]]></category>

		<guid isPermaLink="false">http://www.wpcookies.com/?p=392</guid>
		<description><![CDATA[Just pass the following SQL query either from Terminal or Web Based Database Manager (phpMyAdmin)
UPDATE wp_users SET user_pass = MD5( 'new-password' ) WHERE user_login = 'admin-username';
Change new-password with your new desired password and admin-username with your blog admin username for which you want to change password.
]]></description>
			<content:encoded><![CDATA[<p>Just pass the following SQL query either from Terminal or Web Based Database Manager (phpMyAdmin)</p>
<pre class="brush: sql;">UPDATE wp_users SET user_pass = MD5( 'new-password' ) WHERE user_login = 'admin-username';</pre>
<p>Change <strong>new-password</strong> with your new desired password and <strong>admin-username</strong> with your blog admin username for which you want to change password.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wpcookies.com/how-to-change-wordpress-admin-password-using-sql-query/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Automatically Create Bit.ly Links for Blog Posts</title>
		<link>http://www.wpcookies.com/how-to-automatically-create-bit-ly-links-for-blog-posts/</link>
		<comments>http://www.wpcookies.com/how-to-automatically-create-bit-ly-links-for-blog-posts/#comments</comments>
		<pubDate>Tue, 16 Mar 2010 08:35:44 +0000</pubDate>
		<dc:creator>Wordpress Chef</dc:creator>
				<category><![CDATA[How To's]]></category>

		<guid isPermaLink="false">http://www.wpcookies.com/?p=382</guid>
		<description><![CDATA[Open functions.php file of your theme and add the following code:

function bitlyLink($url) {

$username = &#34;Bit.ly Username&#34;; // Your Bit.ly Username
$api = &#34;Bit.ly API Key&#34;; // Your Bit.ly API Key

$data = file_get_contents(&#34;http://api.bit.ly/shorten?version=2.0.1&#38;format=xml&#38;longUrl=&#34;.$url.&#34;&#38;login=&#34;.$username.&#34;&#38;apiKey=&#34;.$api);

$xml = new SimpleXMLElement($data);
$shortlink = $xml-&#62;results-&#62;nodeKeyVal-&#62;shortUrl;

return $shortlink;
}

Don&#8217;t forget to add your Bit.ly Username and API key (get API key)
Now add the following code within loop [...]]]></description>
			<content:encoded><![CDATA[<p>Open <strong>functions.php</strong> file of your theme and add the following code:</p>
<pre class="brush: php;">
function bitlyLink($url) {

$username = &quot;Bit.ly Username&quot;; // Your Bit.ly Username
$api = &quot;Bit.ly API Key&quot;; // Your Bit.ly API Key

$data = file_get_contents(&quot;http://api.bit.ly/shorten?version=2.0.1&amp;format=xml&amp;longUrl=&quot;.$url.&quot;&amp;login=&quot;.$username.&quot;&amp;apiKey=&quot;.$api);

$xml = new SimpleXMLElement($data);
$shortlink = $xml-&gt;results-&gt;nodeKeyVal-&gt;shortUrl;

return $shortlink;
}
</pre>
<p>Don&#8217;t forget to add your Bit.ly Username and API key (<a href="http://bit.ly/account/">get API key</a>)</p>
<p>Now add the following code within loop in <strong>single.php</strong> file of your theme.</p>
<pre class="brush: php;">
&lt;?php
$bitlyLink = bitlyLink(get_permalink($post-&gt;ID));
echo 'Short Link for this post: &lt;a href=&quot;'.$bitlyLink.'&quot;&gt;'.$bitlyLink.'&lt;/a&gt;'
?&gt;
</pre>
<p><strong>P.S.</strong> All the links will generate within your account so you can track them all by logging in to your Bit.ly account.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wpcookies.com/how-to-automatically-create-bit-ly-links-for-blog-posts/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>How to Add TweetMeme Button on your Wordpress Blog</title>
		<link>http://www.wpcookies.com/how-to-add-tweetmeme-button-on-your-wordpress-blog/</link>
		<comments>http://www.wpcookies.com/how-to-add-tweetmeme-button-on-your-wordpress-blog/#comments</comments>
		<pubDate>Mon, 15 Mar 2010 03:30:29 +0000</pubDate>
		<dc:creator>Wordpress Chef</dc:creator>
				<category><![CDATA[How To's]]></category>

		<guid isPermaLink="false">http://www.wpcookies.com/?p=114</guid>
		<description><![CDATA[Open single.php file of your theme and add the following code where you want to show ReTweet button and Save it:

&#60;script type=&#34;text/javascript&#34;&#62;
tweetmeme_source = 'tweetmeme';
&#60;/script&#62;
&#60;script type=&#34;text/javascript&#34; src=&#34;http://tweetmeme.com/i/scripts/button.js&#34;&#62;&#60;/script&#62;

Change tweetmeme in line 2 with your own Twitter username.
You can also add following code after line 2 for compact button:

tweetmeme_style = 'compact';

]]></description>
			<content:encoded><![CDATA[<p>Open <strong>single.php</strong> file of your theme and add the following code where you want to show ReTweet button and Save it:</p>
<pre class="brush: xml;">
&lt;script type=&quot;text/javascript&quot;&gt;
tweetmeme_source = 'tweetmeme';
&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;http://tweetmeme.com/i/scripts/button.js&quot;&gt;&lt;/script&gt;
</pre>
<p>Change <strong>tweetmeme</strong> in line 2 with your own Twitter username.</p>
<p>You can also add following code after line 2 for compact button:</p>
<pre class="brush: xml;">
tweetmeme_style = 'compact';
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.wpcookies.com/how-to-add-tweetmeme-button-on-your-wordpress-blog/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

