<?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"
	>
<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>
	<pubDate>Fri, 21 Nov 2008 09:26:10 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.2</generator>
		<item>
		<title>By: Brent</title>
		<link>http://www.bonniewren.com/2005/postexpire.htm#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't recognize the php require('post') on the blix theme (for some reason it didn't show up on my last comment</description>
		<content:encoded><![CDATA[<p>it doesn&#8217;t recognize the php require(&#8217;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-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="http://www.kingcosmonaut.de/" rel="nofollow"&gt;Sebastian Schmieg&lt;/a&gt;.

You could also try posting a question at the &lt;a href="http://www.wordpress.org/support" rel="nofollow"&gt;WordPress forum.&lt;/a&gt;  Be sure to put "Blix" in your title and explain your problem clearly.  Volunteers run the forum, so don't be impatient if they don'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-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'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-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're not sure how to work within your WordPress theme files, then I don't recommend trying this unless you're willing to risk making a mistake and messing up your blog.
 
Open up your wp-content--&#62; themes--&#62; [your theme]--&#62; 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 "good" copy of index.php.

Find where "&lt;a href="http://codex.wordpress.org/The_Loop" title="the loop" rel="nofollow"&gt;the Loop&lt;/a&gt;" begins.  If you have the &lt;a href="http://wordpress.org/download/" title="The most recent version of WordPress" rel="nofollow"&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.  "The loop" ends with these lines:

&lt;code&gt;
&lt; ?php endwhile; else: ?&gt;
&lt; ?php _e('Sorry, no posts matched your criteria.'); ?&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('postexpire');
/* only pay attention to the first one if there's a duplicate */ ?&gt;
&lt; ?php if ( !$post_expired &#124;&#124; current_time('mysql') &lt; $post_expired) :
/* if there's no expiration date or it's not been reached yet, go
ahead with displaying the post */ ?&gt;
&lt; ?php require('post.php'); ?&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's editing page in the Dashboard.  

If it doesn't work, replace the index.php file that isn'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-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>
