<?xml version="1.0" encoding="utf-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: How to Set WordPress Posts to Automatically Expire After a Certain Number of Days</title>
	<atom:link href="http://www.bonniewren.com/2005/postexpire.htm/feed" rel="self" type="application/rss+xml" />
	<link>http://www.bonniewren.com/2005/postexpire.htm</link>
	<description>I fought the lawn... and the lawn won</description>
	<lastBuildDate>Mon, 22 Feb 2010 20:36:26 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Brent</title>
		<link>http://www.bonniewren.com/2005/postexpire.htm/comment-page-1#comment-123</link>
		<dc:creator>Brent</dc:creator>
		<pubDate>Fri, 21 Oct 2005 01:54:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.bonniewren.com/?p=168#comment-123</guid>
		<description>it doesn&#039;t recognize the php require(&#039;post&#039;) on the blix theme (for some reason it didn&#039;t show up on my last comment</description>
		<content:encoded><![CDATA[<p>it doesn&#8217;t recognize the php require(&#8216;post&#8217;) on the blix theme (for some reason it didn&#8217;t show up on my last comment</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bonnie Wren</title>
		<link>http://www.bonniewren.com/2005/postexpire.htm/comment-page-1#comment-122</link>
		<dc:creator>Bonnie Wren</dc:creator>
		<pubDate>Fri, 21 Oct 2005 00:45:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.bonniewren.com/?p=168#comment-122</guid>
		<description>Brent, perhaps you should contact the creator of the Blix theme and ask him.  I believe it is &lt;a href=&quot;http://www.kingcosmonaut.de/&quot; rel=&quot;nofollow&quot;&gt;Sebastian Schmieg&lt;/a&gt;.

You could also try posting a question at the &lt;a href=&quot;http://www.wordpress.org/support&quot; rel=&quot;nofollow&quot;&gt;WordPress forum.&lt;/a&gt;  Be sure to put &quot;Blix&quot; in your title and explain your problem clearly.  Volunteers run the forum, so don&#039;t be impatient if they don&#039;t answer quickly.  

Good luck to you!</description>
		<content:encoded><![CDATA[<p>Brent, perhaps you should contact the creator of the Blix theme and ask him.  I believe it is <a href="http://www.kingcosmonaut.de/" rel="nofollow">Sebastian Schmieg</a>.</p>
<p>You could also try posting a question at the <a href="http://www.wordpress.org/support" rel="nofollow">WordPress forum.</a>  Be sure to put &#8220;Blix&#8221; in your title and explain your problem clearly.  Volunteers run the forum, so don&#8217;t be impatient if they don&#8217;t answer quickly.  </p>
<p>Good luck to you!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brent</title>
		<link>http://www.bonniewren.com/2005/postexpire.htm/comment-page-1#comment-121</link>
		<dc:creator>Brent</dc:creator>
		<pubDate>Fri, 21 Oct 2005 00:35:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.bonniewren.com/?p=168#comment-121</guid>
		<description>I am using the blix theme and it doesn&#039;t seem to recognize  is there something I could put in place of that?</description>
		<content:encoded><![CDATA[<p>I am using the blix theme and it doesn&#8217;t seem to recognize  is there something I could put in place of that?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bonnie Wren</title>
		<link>http://www.bonniewren.com/2005/postexpire.htm/comment-page-1#comment-105</link>
		<dc:creator>Bonnie Wren</dc:creator>
		<pubDate>Wed, 12 Oct 2005 17:12:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.bonniewren.com/?p=168#comment-105</guid>
		<description>Oy! EWB!  

Remember that I made a mistake trying it out, and Ashwin had to set me to rights.  If you&#039;re not sure how to work within your WordPress theme files, then I don&#039;t recommend trying this unless you&#039;re willing to risk making a mistake and messing up your blog.
 
Open up your wp-content--&gt; themes--&gt; [your theme]--&gt; index.php file.  &lt;strong&gt;Before you do anything to index.php, be sure to save a copy of it in a safe place,&lt;/strong&gt; so that if you mess things up, you can go right back to the &quot;good&quot; copy of index.php.

Find where &quot;&lt;a href=&quot;http://codex.wordpress.org/The_Loop&quot; title=&quot;the loop&quot; rel=&quot;nofollow&quot;&gt;the Loop&lt;/a&gt;&quot; begins.  If you have the &lt;a href=&quot;http://wordpress.org/download/&quot; title=&quot;The most recent version of WordPress&quot; rel=&quot;nofollow&quot;&gt;most recent version of WordPress&lt;/a&gt; (should be 1.5.2), you want to look for these lines within the index.php file:

&lt;code&gt;
&lt; ?php if (have_posts()) : ?&gt;
&lt; ?php while (have_posts()) : the_post(); ?&gt;
&lt;/code&gt;


...or something similar.  &quot;The loop&quot; ends with these lines:

&lt;code&gt;
&lt; ?php endwhile; else: ?&gt;
&lt; ?php _e(&#039;Sorry, no posts matched your criteria.&#039;); ?&gt;
&lt; ?php endif; ?&gt;
&lt;/code&gt;

If you want to try copying and pasting, copy this text over the old Loop:

&lt;code&gt;
&lt; ?php if (have_posts()) : ?&gt;
&lt; ?php while (have_posts()) : the_post(); ?&gt;
&lt; ?php list ($post_expired) = get_post_custom_values(&#039;postexpire&#039;);
/* only pay attention to the first one if there&#039;s a duplicate */ ?&gt;
&lt; ?php if ( !$post_expired &#124;&#124; current_time(&#039;mysql&#039;) &lt; $post_expired) :
/* if there&#039;s no expiration date or it&#039;s not been reached yet, go
ahead with displaying the post */ ?&gt;
&lt; ?php require(&#039;post.php&#039;); ?&gt;
&lt; ?php endif; /* end not-expired test */ ?&gt;
&lt; ?php endwhile; ?&gt;

&lt;/code&gt;

Save this index.php and upload it to your theme folder, and see if your website works correctly.  If it does, then you can go ahead and create a custom field value on the post&#039;s editing page in the Dashboard.  

If it doesn&#039;t work, replace the index.php file that isn&#039;t working with the saved one that does work, and find somebody else to do it!</description>
		<content:encoded><![CDATA[<p>Oy! EWB!  </p>
<p>Remember that I made a mistake trying it out, and Ashwin had to set me to rights.  If you&#8217;re not sure how to work within your WordPress theme files, then I don&#8217;t recommend trying this unless you&#8217;re willing to risk making a mistake and messing up your blog.</p>
<p>Open up your wp-content&#8211;&gt; themes&#8211;&gt; [your theme]&#8211;&gt; index.php file.  <strong>Before you do anything to index.php, be sure to save a copy of it in a safe place,</strong> so that if you mess things up, you can go right back to the &#8220;good&#8221; copy of index.php.</p>
<p>Find where &#8220;<a href="http://codex.wordpress.org/The_Loop" title="the loop" rel="nofollow">the Loop</a>&#8221; begins.  If you have the <a href="http://wordpress.org/download/" title="The most recent version of WordPress" rel="nofollow">most recent version of WordPress</a> (should be 1.5.2), you want to look for these lines within the index.php file:</p>
<p><code><br />
< ?php if (have_posts()) : ?><br />
< ?php while (have_posts()) : the_post(); ?><br />
</code></p>
<p>&#8230;or something similar.  &#8220;The loop&#8221; ends with these lines:</p>
<p><code><br />
< ?php endwhile; else: ?><br />
< ?php _e('Sorry, no posts matched your criteria.'); ?><br />
< ?php endif; ?><br />
</code></p>
<p>If you want to try copying and pasting, copy this text over the old Loop:</p>
<p><code><br />
< ?php if (have_posts()) : ?><br />
< ?php while (have_posts()) : the_post(); ?><br />
< ?php list ($post_expired) = get_post_custom_values('postexpire');<br />
/* only pay attention to the first one if there's a duplicate */ ?><br />
< ?php if ( !$post_expired || current_time('mysql') < $post_expired) :<br />
/* if there's no expiration date or it's not been reached yet, go<br />
ahead with displaying the post */ ?><br />
< ?php require('post.php'); ?><br />
< ?php endif; /* end not-expired test */ ?><br />
< ?php endwhile; ?></p>
<p></code></p>
<p>Save this index.php and upload it to your theme folder, and see if your website works correctly.  If it does, then you can go ahead and create a custom field value on the post&#8217;s editing page in the Dashboard.  </p>
<p>If it doesn&#8217;t work, replace the index.php file that isn&#8217;t working with the saved one that does work, and find somebody else to do it!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: EWB</title>
		<link>http://www.bonniewren.com/2005/postexpire.htm/comment-page-1#comment-104</link>
		<dc:creator>EWB</dc:creator>
		<pubDate>Wed, 12 Oct 2005 15:31:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.bonniewren.com/?p=168#comment-104</guid>
		<description>This looks very useful.  Where, exactly, should I be placing the suggested code?  Thanks</description>
		<content:encoded><![CDATA[<p>This looks very useful.  Where, exactly, should I be placing the suggested code?  Thanks</p>
]]></content:encoded>
	</item>
</channel>
</rss>
