<?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; Loop</title>
	<atom:link href="http://www.wpfunc.com/tag/loop/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>Add Numbers next to each post!</title>
		<link>http://www.wpfunc.com/wordpress/add-numbers-next-to-each-post.html</link>
		<comments>http://www.wpfunc.com/wordpress/add-numbers-next-to-each-post.html#comments</comments>
		<pubDate>Mon, 19 Apr 2010 21:23:21 +0000</pubDate>
		<dc:creator>KaiseRCrazY</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[article]]></category>
		<category><![CDATA[article numbers]]></category>
		<category><![CDATA[article title]]></category>
		<category><![CDATA[functions.php]]></category>
		<category><![CDATA[Loop]]></category>
		<category><![CDATA[trick]]></category>
		<category><![CDATA[wordpress forums]]></category>
		<category><![CDATA[wprecipes]]></category>

		<guid isPermaLink="false">http://www.wpfunc.com/?p=425</guid>
		<description><![CDATA[I found that trick in WordPress Forums. After i saw this trick into WpRecipes. You can add article numbers (ex. Article #1, Article #2) next to your posts. Let&#8217;s Begin&#8230;
Here is the code;
Add this code into your theme&#8217;s functions.php;
function updateNumbers() {
/* numbering the published posts: preparation: create an array with the ID in sequence of [...]<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/create-a-random-post-button.html' rel='bookmark' title='Permanent Link: Create a Random Post Button!'>Create a Random Post Button!</a></li>
<li><a href='http://www.wpfunc.com/wordpress/popular-posts-without-any-plugin.html' rel='bookmark' title='Permanent Link: Popular Posts, Without any Plugin!'>Popular Posts, Without any Plugin!</a></li>
<li><a href='http://www.wpfunc.com/wordpress/how-to-change-your-post-page-title-with-a-custom-field.html' rel='bookmark' title='Permanent Link: How to change your Post/Page title with a custom field?'>How to change your Post/Page title with a custom field?</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">I found that trick in <a href="http://wordpress.org/support/topic/375293?replies=5#post-1453605" target="_blank">WordPress Forums</a>. After i saw this trick into WpRecipes. You can add article numbers (ex. Article #1, Article #2) next to your posts. Let&#8217;s Begin&#8230;<span id="more-425"></span></p>
<h3 style="text-align: justify;">Here is the code;</h3>
<p style="text-align: justify;">Add this code into your <span style="color: #ff0000;"><strong>theme&#8217;s functions.php</strong></span>;</p>
<pre class="brush: php;">function updateNumbers() {
/* numbering the published posts: preparation: create an array with the ID in sequence of publication date, /
/ save the number in custom field 'incr_number' of post with ID  /
/ to show in post (within the loop) use &lt;?php echo get_post_meta($post-&gt;ID,'incr_number',true); ?&gt;
/ alchymyth 2010 */
global $wpdb;
$querystr = &quot;SELECT $wpdb-&gt;posts.* FROM $wpdb-&gt;posts WHERE $wpdb-&gt;posts.post_status = 'publish' AND $wpdb-&gt;posts.post_type = 'post' &quot;;
$pageposts = $wpdb-&gt;get_results($querystr, OBJECT);
$counts = 0 ;
if ($pageposts):
foreach ($pageposts as $post):
setup_postdata($post);
$counts++;
add_post_meta($post-&gt;ID, 'incr_number', $counts, true);
update_post_meta($post-&gt;ID, 'incr_number', $counts);
endforeach;
endif;
}

add_action ( 'publish_post', 'updateNumbers' );
add_action ( 'deleted_post', 'updateNumbers' );
add_action ( 'edit_post', 'updateNumbers' );</pre>
<p style="text-align: justify;">After this you can use this short code when you call your article names.</p>
<pre class="brush: php;">&lt;?php echo get_post_meta($post-&gt;ID,'incr_number',true); ?&gt; </pre>
<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-numbers-next-to-each-post.html&amp;title=Add%20Numbers%20next%20to%20each%20post%21&amp;notes=I%20found%20that%20trick%20in%20WordPress%20Forums.%20After%20i%20saw%20this%20trick%20into%20WpRecipes.%20You%20can%20add%20article%20numbers%20%28ex.%20Article%20%231%2C%20Article%20%232%29%20next%20to%20your%20posts.%20Let%27s%20Begin...%0D%0A%0D%0AHere%20is%20the%20code%3B%0D%0AAdd%20this%20code%20into%20your%20theme%27s%20functions.php%3B%0D%0A%0D%0A%5Bphp%5Dfu'><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-numbers-next-to-each-post.html&amp;title=Add%20Numbers%20next%20to%20each%20post%21&amp;bodytext=I%20found%20that%20trick%20in%20WordPress%20Forums.%20After%20i%20saw%20this%20trick%20into%20WpRecipes.%20You%20can%20add%20article%20numbers%20%28ex.%20Article%20%231%2C%20Article%20%232%29%20next%20to%20your%20posts.%20Let%27s%20Begin...%0D%0A%0D%0AHere%20is%20the%20code%3B%0D%0AAdd%20this%20code%20into%20your%20theme%27s%20functions.php%3B%0D%0A%0D%0A%5Bphp%5Dfu'><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-numbers-next-to-each-post.html&amp;t=Add%20Numbers%20next%20to%20each%20post%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%20Numbers%20next%20to%20each%20post%21&amp;link=http%3A%2F%2Fwww.wpfunc.com%2Fwordpress%2Fadd-numbers-next-to-each-post.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-numbers-next-to-each-post.html&amp;title=Add%20Numbers%20next%20to%20each%20post%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-numbers-next-to-each-post.html&amp;title=Add%20Numbers%20next%20to%20each%20post%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-numbers-next-to-each-post.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-numbers-next-to-each-post.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-numbers-next-to-each-post.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/create-a-random-post-button.html' rel='bookmark' title='Permanent Link: Create a Random Post Button!'>Create a Random Post Button!</a></li>
<li><a href='http://www.wpfunc.com/wordpress/popular-posts-without-any-plugin.html' rel='bookmark' title='Permanent Link: Popular Posts, Without any Plugin!'>Popular Posts, Without any Plugin!</a></li>
<li><a href='http://www.wpfunc.com/wordpress/how-to-change-your-post-page-title-with-a-custom-field.html' rel='bookmark' title='Permanent Link: How to change your Post/Page title with a custom field?'>How to change your Post/Page title with a custom field?</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.wpfunc.com/wordpress/add-numbers-next-to-each-post.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Create a shortcode for displaying the Loop</title>
		<link>http://www.wpfunc.com/wordpress/create-a-shortcode-for-displaying-the-loop.html</link>
		<comments>http://www.wpfunc.com/wordpress/create-a-shortcode-for-displaying-the-loop.html#comments</comments>
		<pubDate>Tue, 10 Nov 2009 11:31:05 +0000</pubDate>
		<dc:creator>KaiseRCrazY</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[category]]></category>
		<category><![CDATA[CMS]]></category>
		<category><![CDATA[functions.php]]></category>
		<category><![CDATA[Loop]]></category>
		<category><![CDATA[shortcode]]></category>
		<category><![CDATA[the_loop]]></category>

		<guid isPermaLink="false">http://www.wpfunc.com/?p=277</guid>
		<description><![CDATA[Hi everybody. We can use WordPress as a CMS and we can change default loop area displaying for anywhere. We have to make a shortcode for this. Let&#8217;s Begin&#8230;
Here is the code;
Add this code to your theme&#8217;s functions.php and use shortcode in your teheme.
function myLoop($atts, $content = null) {
	extract(shortcode_atts(array(
		&#34;pagination&#34; =&#62; 'true',
		&#34;query&#34; =&#62; '',
		&#34;category&#34; =&#62; '',
	), [...]<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/create-pdf-button.html' rel='bookmark' title='Permanent Link: Create PDF Button'>Create PDF Button</a></li>
<li><a href='http://www.wpfunc.com/wordpress/add-numbers-next-to-each-post.html' rel='bookmark' title='Permanent Link: Add Numbers next to each post!'>Add Numbers next to each post!</a></li>
<li><a href='http://www.wpfunc.com/wordpress/create-custom-date-butons.html' rel='bookmark' title='Permanent Link: Create Custom Date Butons!'>Create Custom Date Butons!</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">Hi everybody. We can use WordPress as a CMS and we can change default loop area displaying for anywhere. We have to make a shortcode for this. Let&#8217;s Begin&#8230;<span id="more-277"></span></p>
<h3>Here is the code;</h3>
<p style="text-align: justify;">Add this code to your theme&#8217;s <span style="color: #ff0000;"><em><strong>functions.php</strong></em></span> and use <span style="color: #ff0000;"><em><strong>shortcode</strong></em></span> in your teheme.</p>
<pre class="brush: php;">function myLoop($atts, $content = null) {
	extract(shortcode_atts(array(
		&quot;pagination&quot; =&gt; 'true',
		&quot;query&quot; =&gt; '',
		&quot;category&quot; =&gt; '',
	), $atts));
	global $wp_query,$paged,$post;
	$temp = $wp_query;
	$wp_query= null;
	$wp_query = new WP_Query();
	if($pagination == 'true'){
		$query .= '&amp;paged='.$paged;
	}
	if(!empty($category)){
		$query .= '&amp;category_name='.$category;
	}
	if(!empty($query)){
		$query .= $query;
	}
	$wp_query-&gt;query($query);
	ob_start();
	?&gt;
	&lt;h2&gt;&lt;?php echo $category; ?&gt;&lt;/h2&gt;
	&lt;ul class=&quot;loop&quot;&gt;
	&lt;?php while ($wp_query-&gt;have_posts()) : $wp_query-&gt;the_post(); ?&gt;
		&lt;li&gt;&lt;a href=&quot;&lt;?php the_permalink() ?&gt;&quot; rel=&quot;bookmark&quot;&gt;&lt;?php echo $thumbnail_image; the_title(); ?&gt;&lt;/a&gt;&lt;/li&gt;
	&lt;?php endwhile; ?&gt;
	&lt;/ul&gt;
	&lt;?php if(pagination == 'true'){ ?&gt;
	&lt;div class=&quot;navigation&quot;&gt;
	  &lt;div class=&quot;alignleft&quot;&gt;&lt;?php previous_posts_link('« Previous') ?&gt;&lt;/div&gt;
	  &lt;div class=&quot;alignright&quot;&gt;&lt;?php next_posts_link('More »') ?&gt;&lt;/div&gt;
	&lt;/div&gt;
	&lt;?php } ?&gt;
	&lt;?php $wp_query = null; $wp_query = $temp;
	$content = ob_get_contents();
	ob_end_clean();
	return $content;
}
add_shortcode(&quot;loop&quot;, &quot;myLoop&quot;);
</pre>
<h3>ShortCode;</h3>
<pre class="brush: php;">[loop category=&quot;news&quot; query=&quot;&quot; pagination=&quot;false&quot;]</pre>
<p>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%2Fcreate-a-shortcode-for-displaying-the-loop.html&amp;title=Create%20a%20shortcode%20for%20displaying%20the%20Loop&amp;notes=Hi%20everybody.%20We%20can%20use%20WordPress%20as%20a%20CMS%20and%20we%20can%20change%20default%20loop%20area%20displaying%20for%20anywhere.%20We%20have%20to%20make%20a%20shortcode%20for%20this.%20Let%27s%20Begin...%0D%0A%0D%0AHere%20is%20the%20code%3B%0D%0AAdd%20this%20code%20to%20your%20theme%27s%20functions.php%20and%20use%20shortcode%20in%20your%20'><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%2Fcreate-a-shortcode-for-displaying-the-loop.html&amp;title=Create%20a%20shortcode%20for%20displaying%20the%20Loop&amp;bodytext=Hi%20everybody.%20We%20can%20use%20WordPress%20as%20a%20CMS%20and%20we%20can%20change%20default%20loop%20area%20displaying%20for%20anywhere.%20We%20have%20to%20make%20a%20shortcode%20for%20this.%20Let%27s%20Begin...%0D%0A%0D%0AHere%20is%20the%20code%3B%0D%0AAdd%20this%20code%20to%20your%20theme%27s%20functions.php%20and%20use%20shortcode%20in%20your%20'><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%2Fcreate-a-shortcode-for-displaying-the-loop.html&amp;t=Create%20a%20shortcode%20for%20displaying%20the%20Loop'><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=Create%20a%20shortcode%20for%20displaying%20the%20Loop&amp;link=http%3A%2F%2Fwww.wpfunc.com%2Fwordpress%2Fcreate-a-shortcode-for-displaying-the-loop.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%2Fcreate-a-shortcode-for-displaying-the-loop.html&amp;title=Create%20a%20shortcode%20for%20displaying%20the%20Loop'><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%2Fcreate-a-shortcode-for-displaying-the-loop.html&amp;title=Create%20a%20shortcode%20for%20displaying%20the%20Loop'><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%2Fcreate-a-shortcode-for-displaying-the-loop.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%2Fcreate-a-shortcode-for-displaying-the-loop.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%2Fcreate-a-shortcode-for-displaying-the-loop.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/create-pdf-button.html' rel='bookmark' title='Permanent Link: Create PDF Button'>Create PDF Button</a></li>
<li><a href='http://www.wpfunc.com/wordpress/add-numbers-next-to-each-post.html' rel='bookmark' title='Permanent Link: Add Numbers next to each post!'>Add Numbers next to each post!</a></li>
<li><a href='http://www.wpfunc.com/wordpress/create-custom-date-butons.html' rel='bookmark' title='Permanent Link: Create Custom Date Butons!'>Create Custom Date Butons!</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.wpfunc.com/wordpress/create-a-shortcode-for-displaying-the-loop.html/feed</wfw:commentRss>
		<slash:comments>1</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>
