<?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>WpFunc &#187; time</title>
	<atom:link href="http://www.wpfunc.com/tag/time/feed" rel="self" type="application/rss+xml" />
	<link>http://www.wpfunc.com</link>
	<description>Awesome, Quick, Simple WordPress Functions!</description>
	<lastBuildDate>Fri, 09 Jul 2010 09:05:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Delay your feed updates</title>
		<link>http://www.wpfunc.com/wordpress/delay-your-feed-updates.html</link>
		<comments>http://www.wpfunc.com/wordpress/delay-your-feed-updates.html#comments</comments>
		<pubDate>Thu, 01 Jul 2010 07:47:49 +0000</pubDate>
		<dc:creator>KaiseRCrazY</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[delay]]></category>
		<category><![CDATA[delay time]]></category>
		<category><![CDATA[feed]]></category>
		<category><![CDATA[functions.php]]></category>
		<category><![CDATA[publish time]]></category>
		<category><![CDATA[time]]></category>
		<category><![CDATA[update]]></category>

		<guid isPermaLink="false">http://www.wpfunc.com/?p=454</guid>
		<description><![CDATA[You can set the feed update time with a simple function. The only need you have to edit your theme&#8217;s functions.php. Let&#8217;s Begin.
Here is the code;
// delay feed update
function publish_later_on_feed($where) {
	global $wpdb;

	if (is_feed()) {
		// timestamp in WP-format
		$now = gmdate('Y-m-d H:i:s');

		// value for wait; + device
		$wait = '5'; // integer

		// http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html#function_timestampdiff
		$device = 'MINUTE'; // MINUTE, HOUR, [...]<hr /><div style="text-align:center;">
<a href="http://aweber.com/?339698" title="Email Marketing">
<img src="http://www.aweber.com/banners/email_marketing/468x60_an.gif" alt="Email Marketing $19/Month!" style="border:none;" /></a>
</div><hr />


Related posts:<ol><li><a href='http://www.wpfunc.com/wordpress/do-you-want-to-add-your-ads-to-your-blog-feed.html' rel='bookmark' title='Permanent Link: Do you want to add your ads to your Blog Feed?'>Do you want to add your ads to your Blog Feed?</a></li>
<li><a href='http://www.wpfunc.com/wordpress/make-your-rss-feed-link-auto-discoverable.html' rel='bookmark' title='Permanent Link: Make Your RSS Feed Link Auto Discoverable!'>Make Your RSS Feed Link Auto Discoverable!</a></li>
<li><a href='http://www.wpfunc.com/wordpress/contact-form-7-changes-plugin-admin-path.html' rel='bookmark' title='Permanent Link: Contact Form 7 Changes Plugin Admin Path!'>Contact Form 7 Changes Plugin Admin Path!</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>You can set the feed update time with a simple function. The only need you have to edit your theme&#8217;s functions.php. Let&#8217;s Begin.<span id="more-454"></span></p>
<h3>Here is the code;</h3>
<pre class="brush: php;">// delay feed update
function publish_later_on_feed($where) {
	global $wpdb;

	if (is_feed()) {
		// timestamp in WP-format
		$now = gmdate('Y-m-d H:i:s');

		// value for wait; + device
		$wait = '5'; // integer

		// http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html#function_timestampdiff
		$device = 'MINUTE'; // MINUTE, HOUR, DAY, WEEK, MONTH, YEAR

		// add SQL-sytax to default $where
		$where .= &quot; AND TIMESTAMPDIFF($device, $wpdb-&gt;posts.post_date_gmt, '$now') &gt; $wait &quot;;
	}
	return $where;
}
add_filter('posts_where', 'publish_later_on_feed');</pre>
<p>With this code update will wait for 5 minutes. You can chnge this time period. Just change <span style="color: #ff0000;"><strong>$wait</strong></span> value for this.<br />
That&#8217;s All. Have a nice day.</p>
<a rel='nofollow' target='_blank'  href='http://delicious.com/post?url=http%3A%2F%2Fwww.wpfunc.com%2Fwordpress%2Fdelay-your-feed-updates.html&amp;title=Delay%20your%20feed%20updates&amp;notes=You%20can%20set%20the%20feed%20update%20time%20with%20a%20simple%20function.%20The%20only%20need%20you%20have%20to%20edit%20your%20theme%27s%20functions.php.%20Let%27s%20Begin.%0D%0AHere%20is%20the%20code%3B%0D%0A%5Bphp%5D%2F%2F%20delay%20feed%20update%0D%0Afunction%20publish_later_on_feed%28%24where%29%20%7B%0D%0A%09global%20%24wpdb%3B%0D%0A%0D%0A%09if%20%28is_feed%28%29'><img src='http://www.wpfunc.com/wp-content/plugins/sociable-30/images/default/16/delicious.png' class='sociable-img sociable-hovers ' title='del.icio.us' alt='del.icio.us' /></a><a rel='nofollow' target='_blank'  href='http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.wpfunc.com%2Fwordpress%2Fdelay-your-feed-updates.html&amp;title=Delay%20your%20feed%20updates&amp;bodytext=You%20can%20set%20the%20feed%20update%20time%20with%20a%20simple%20function.%20The%20only%20need%20you%20have%20to%20edit%20your%20theme%27s%20functions.php.%20Let%27s%20Begin.%0D%0AHere%20is%20the%20code%3B%0D%0A%5Bphp%5D%2F%2F%20delay%20feed%20update%0D%0Afunction%20publish_later_on_feed%28%24where%29%20%7B%0D%0A%09global%20%24wpdb%3B%0D%0A%0D%0A%09if%20%28is_feed%28%29'><img src='http://www.wpfunc.com/wp-content/plugins/sociable-30/images/default/16/digg.png' class='sociable-img sociable-hovers ' title='Digg' alt='Digg' /></a><a rel='nofollow' target='_blank'  href='http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.wpfunc.com%2Fwordpress%2Fdelay-your-feed-updates.html&amp;t=Delay%20your%20feed%20updates'><img src='http://www.wpfunc.com/wp-content/plugins/sociable-30/images/default/16/facebook.png' class='sociable-img sociable-hovers ' title='Facebook' alt='Facebook' /></a><a rel='nofollow' target='_blank'  href='http://www.friendfeed.com/share?title=Delay%20your%20feed%20updates&amp;link=http%3A%2F%2Fwww.wpfunc.com%2Fwordpress%2Fdelay-your-feed-updates.html'><img src='http://www.wpfunc.com/wp-content/plugins/sociable-30/images/default/16/friendfeed.png' class='sociable-img sociable-hovers ' title='FriendFeed' alt='FriendFeed' /></a><a rel='nofollow' target='_blank'  href='http://reddit.com/submit?url=http%3A%2F%2Fwww.wpfunc.com%2Fwordpress%2Fdelay-your-feed-updates.html&amp;title=Delay%20your%20feed%20updates'><img src='http://www.wpfunc.com/wp-content/plugins/sociable-30/images/default/16/reddit.png' class='sociable-img sociable-hovers ' title='Reddit' alt='Reddit' /></a><a rel='nofollow' target='_blank'  href='http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.wpfunc.com%2Fwordpress%2Fdelay-your-feed-updates.html&amp;title=Delay%20your%20feed%20updates'><img src='http://www.wpfunc.com/wp-content/plugins/sociable-30/images/default/16/stumbleupon.png' class='sociable-img sociable-hovers ' title='StumbleUpon' alt='StumbleUpon' /></a><a rel='nofollow' target='_blank'  href='http://technorati.com/faves?add=http%3A%2F%2Fwww.wpfunc.com%2Fwordpress%2Fdelay-your-feed-updates.html'><img src='http://www.wpfunc.com/wp-content/plugins/sociable-30/images/default/16/technorati.png' class='sociable-img sociable-hovers ' title='Technorati' alt='Technorati' /></a><a rel='nofollow' target='_blank'  href='http://www.printfriendly.com/print?url=http%3A%2F%2Fwww.wpfunc.com%2Fwordpress%2Fdelay-your-feed-updates.html&amp;partner=sociable'><img src='http://www.wpfunc.com/wp-content/plugins/sociable-30/images/default/16/pdf.png' class='sociable-img sociable-hovers ' title='PDF' alt='PDF' /></a><a rel='nofollow' target='_blank'  href='http://www.printfriendly.com/print?url=http%3A%2F%2Fwww.wpfunc.com%2Fwordpress%2Fdelay-your-feed-updates.html&amp;partner=sociable'><img src='http://www.wpfunc.com/wp-content/plugins/sociable-30/images/default/16/printfriendly.png' class='sociable-img sociable-hovers ' title='Print' alt='Print' /></a><br/><br/>

<p>Related posts:<ol><li><a href='http://www.wpfunc.com/wordpress/do-you-want-to-add-your-ads-to-your-blog-feed.html' rel='bookmark' title='Permanent Link: Do you want to add your ads to your Blog Feed?'>Do you want to add your ads to your Blog Feed?</a></li>
<li><a href='http://www.wpfunc.com/wordpress/make-your-rss-feed-link-auto-discoverable.html' rel='bookmark' title='Permanent Link: Make Your RSS Feed Link Auto Discoverable!'>Make Your RSS Feed Link Auto Discoverable!</a></li>
<li><a href='http://www.wpfunc.com/wordpress/contact-form-7-changes-plugin-admin-path.html' rel='bookmark' title='Permanent Link: Contact Form 7 Changes Plugin Admin Path!'>Contact Form 7 Changes Plugin Admin Path!</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.wpfunc.com/wordpress/delay-your-feed-updates.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Add an expration date for posts!</title>
		<link>http://www.wpfunc.com/wordpress/add-an-expration-date-for-posts.html</link>
		<comments>http://www.wpfunc.com/wordpress/add-an-expration-date-for-posts.html#comments</comments>
		<pubDate>Sun, 19 Jul 2009 07:00:25 +0000</pubDate>
		<dc:creator>KaiseRCrazY</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[date]]></category>
		<category><![CDATA[expration]]></category>
		<category><![CDATA[Loop]]></category>
		<category><![CDATA[posts]]></category>
		<category><![CDATA[time]]></category>

		<guid isPermaLink="false">http://www.wpfunc.com/?p=52</guid>
		<description><![CDATA[If you want to add an expration date to your posts you have to change your WordPress&#8217; Loop area. This is not delete your posts, only turns to draft. When you change Loop area you will able to add an expration date with custom fileds. This is very simple function/recipe.Firstly you have to change your [...]<hr /><div style="text-align:center;">
<a href="http://aweber.com/?339698" title="Email Marketing">
<img src="http://www.aweber.com/banners/email_marketing/468x60_an.gif" alt="Email Marketing $19/Month!" style="border:none;" /></a>
</div><hr />


Related posts:<ol><li><a href='http://www.wpfunc.com/wordpress/related-posts-with-thumbnails.html' rel='bookmark' title='Permanent Link: Related Posts With Thumbnails'>Related Posts With Thumbnails</a></li>
<li><a href='http://www.wpfunc.com/general/related-posts-without-any-plugin.html' rel='bookmark' title='Permanent Link: Related Posts, Without any Plugin!'>Related Posts, Without any Plugin!</a></li>
<li><a href='http://www.wpfunc.com/wordpress/simple-sticky-posts.html' rel='bookmark' title='Permanent Link: Simple Sticky Posts!'>Simple Sticky Posts!</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">If you want to add an expration date to your posts you have to change your WordPress&#8217; Loop area. This is not delete your posts, only turns to draft. When you change Loop area you will able to add an expration date with custom fileds. This is very simple function/recipe.<span id="more-52"></span>Firstly you have to change your <strong><em>Loop</em></strong><span style="color: #ff0000;"> <span style="color: #000000;">area. You have to change your theme files for this.</span><em><strong> </strong></em></span><span style="color: #ff0000;"><em><strong>Every Loop area must change.</strong></em></span></p>
<p>Change your <em><strong>Loop</strong></em> area wtih this code.</p>
<pre class="brush: plain;">
&lt;?php
if (have_posts()) :
     while (have_posts()) : the_post(); ?&gt;
         $expirationtime = get_post_custom_values('expiration');
         if (is_array($expirationtime)) {
             $expirestring = implode($expirationtime);
         }

         $secondsbetween = strtotime($expirestring)-time();
         if ( $secondsbetween &gt; 0 ) {
             // For example...
             the_title();
             the_excerpt();
         }
     endwhile;
endif;
?&gt;
</pre>
<p style="text-align: justify;">After apply this code you can add a custom filed, the name of custom filed is <em><strong><span style="color: #ff0000;">expration</span></strong></em>. The custom fileds value must be like <strong><span style="color: #ff0000;">mm/dd/yyyy 00:00:00</span></strong>.</p>
<p style="text-align: justify;">That&#8217;s All! Have a nice day!</p>
<a rel='nofollow' target='_blank'  href='http://delicious.com/post?url=http%3A%2F%2Fwww.wpfunc.com%2Fwordpress%2Fadd-an-expration-date-for-posts.html&amp;title=Add%20an%20expration%20date%20for%20posts%21&amp;notes=If%20you%20want%20to%20add%20an%20expration%20date%20to%20your%20posts%20you%20have%20to%20change%20your%20WordPress%27%20Loop%20area.%20This%20is%20not%20delete%20your%20posts%2C%20only%20turns%20to%20draft.%20When%20you%20change%20Loop%20area%20you%20will%20able%20to%20add%20an%20expration%20date%20with%20custom%20fileds.%20This%20is%20very%20sim'><img src='http://www.wpfunc.com/wp-content/plugins/sociable-30/images/default/16/delicious.png' class='sociable-img sociable-hovers ' title='del.icio.us' alt='del.icio.us' /></a><a rel='nofollow' target='_blank'  href='http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.wpfunc.com%2Fwordpress%2Fadd-an-expration-date-for-posts.html&amp;title=Add%20an%20expration%20date%20for%20posts%21&amp;bodytext=If%20you%20want%20to%20add%20an%20expration%20date%20to%20your%20posts%20you%20have%20to%20change%20your%20WordPress%27%20Loop%20area.%20This%20is%20not%20delete%20your%20posts%2C%20only%20turns%20to%20draft.%20When%20you%20change%20Loop%20area%20you%20will%20able%20to%20add%20an%20expration%20date%20with%20custom%20fileds.%20This%20is%20very%20sim'><img src='http://www.wpfunc.com/wp-content/plugins/sociable-30/images/default/16/digg.png' class='sociable-img sociable-hovers ' title='Digg' alt='Digg' /></a><a rel='nofollow' target='_blank'  href='http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.wpfunc.com%2Fwordpress%2Fadd-an-expration-date-for-posts.html&amp;t=Add%20an%20expration%20date%20for%20posts%21'><img src='http://www.wpfunc.com/wp-content/plugins/sociable-30/images/default/16/facebook.png' class='sociable-img sociable-hovers ' title='Facebook' alt='Facebook' /></a><a rel='nofollow' target='_blank'  href='http://www.friendfeed.com/share?title=Add%20an%20expration%20date%20for%20posts%21&amp;link=http%3A%2F%2Fwww.wpfunc.com%2Fwordpress%2Fadd-an-expration-date-for-posts.html'><img src='http://www.wpfunc.com/wp-content/plugins/sociable-30/images/default/16/friendfeed.png' class='sociable-img sociable-hovers ' title='FriendFeed' alt='FriendFeed' /></a><a rel='nofollow' target='_blank'  href='http://reddit.com/submit?url=http%3A%2F%2Fwww.wpfunc.com%2Fwordpress%2Fadd-an-expration-date-for-posts.html&amp;title=Add%20an%20expration%20date%20for%20posts%21'><img src='http://www.wpfunc.com/wp-content/plugins/sociable-30/images/default/16/reddit.png' class='sociable-img sociable-hovers ' title='Reddit' alt='Reddit' /></a><a rel='nofollow' target='_blank'  href='http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.wpfunc.com%2Fwordpress%2Fadd-an-expration-date-for-posts.html&amp;title=Add%20an%20expration%20date%20for%20posts%21'><img src='http://www.wpfunc.com/wp-content/plugins/sociable-30/images/default/16/stumbleupon.png' class='sociable-img sociable-hovers ' title='StumbleUpon' alt='StumbleUpon' /></a><a rel='nofollow' target='_blank'  href='http://technorati.com/faves?add=http%3A%2F%2Fwww.wpfunc.com%2Fwordpress%2Fadd-an-expration-date-for-posts.html'><img src='http://www.wpfunc.com/wp-content/plugins/sociable-30/images/default/16/technorati.png' class='sociable-img sociable-hovers ' title='Technorati' alt='Technorati' /></a><a rel='nofollow' target='_blank'  href='http://www.printfriendly.com/print?url=http%3A%2F%2Fwww.wpfunc.com%2Fwordpress%2Fadd-an-expration-date-for-posts.html&amp;partner=sociable'><img src='http://www.wpfunc.com/wp-content/plugins/sociable-30/images/default/16/pdf.png' class='sociable-img sociable-hovers ' title='PDF' alt='PDF' /></a><a rel='nofollow' target='_blank'  href='http://www.printfriendly.com/print?url=http%3A%2F%2Fwww.wpfunc.com%2Fwordpress%2Fadd-an-expration-date-for-posts.html&amp;partner=sociable'><img src='http://www.wpfunc.com/wp-content/plugins/sociable-30/images/default/16/printfriendly.png' class='sociable-img sociable-hovers ' title='Print' alt='Print' /></a><br/><br/>

<p>Related posts:<ol><li><a href='http://www.wpfunc.com/wordpress/related-posts-with-thumbnails.html' rel='bookmark' title='Permanent Link: Related Posts With Thumbnails'>Related Posts With Thumbnails</a></li>
<li><a href='http://www.wpfunc.com/general/related-posts-without-any-plugin.html' rel='bookmark' title='Permanent Link: Related Posts, Without any Plugin!'>Related Posts, Without any Plugin!</a></li>
<li><a href='http://www.wpfunc.com/wordpress/simple-sticky-posts.html' rel='bookmark' title='Permanent Link: Simple Sticky Posts!'>Simple Sticky Posts!</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.wpfunc.com/wordpress/add-an-expration-date-for-posts.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
