<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>Comments on snippet: 'Wordpress post expiration code'</title>
<link>http://snipplr.com</link>
<description>Snipplr comments feed'</description>
<language>en-us</language>
<pubDate>Tue, 14 Feb 2012 06:38:38 GMT</pubDate>
<item>
<title>ramborc said on 3/4/11</title>
<link>http://snipplr.com/view/3899/wordpress-post-expiration-code/</link>
<description><![CDATA[ I've posted an updated version of this code that works with European date format (d.m.Y) at <a href="http://snipplr.com/view/50046/updated-march-2011-wordpress-post-expiration-code/">http://snipplr.com/view/50046/updated-march-2011-wordpress-post-expiration-code/</a> ]]></description>
<pubDate>Fri, 04 Mar 2011 20:40:23 GMT</pubDate>
<guid>http://snipplr.com/view/3899/wordpress-post-expiration-code/</guid>
</item>
<item>
<title>fendichen said on 10/7/10</title>
<link>http://snipplr.com/view/3899/wordpress-post-expiration-code/</link>
<description><![CDATA[ hi friend, do you know <strong><a href="http://www.hghdoctor.com">cheap ghd</a></strong>, 
<strong><a href="http://www.ilovembt.com">cheap mbt shoes</a></strong>, 
<strong><a href="http://www.christianlouboutinspace.com">christian louboutin shoes</a></strong> hot sell online recently?

we are china wholesaler company, offer good quality <strong><a href="http://www.shoeglobal.com">nike dunks</a></strong>, 
<strong><a href="http://www.springhd.com">ghd mk4</a></strong>, <strong><a href="http://www.jerseylink.com">cheap soccer jerseys</a></strong> online, <strong><a href="http://www.jerseylink.com">cheap jerseys</a></strong> online enjoy much discount.<strong><a href="http://www.shoeglobal.com">cheap nike dunks</a></strong>,<strong><a href="http://www.shoeglobal.com">nike shox</a></strong>
why are you hestitate, welcome for retail, dropship, and wholesale orders. ]]></description>
<pubDate>Thu, 07 Oct 2010 22:56:42 GMT</pubDate>
<guid>http://snipplr.com/view/3899/wordpress-post-expiration-code/</guid>
</item>
<item>
<title>gjindancer said on 6/28/09</title>
<link>http://snipplr.com/view/3899/wordpress-post-expiration-code/</link>
<description><![CDATA[ Hi All! I noticed dwest's post has not worked and a solution for including the time in the expiry date was not included.

I've updated the code to include time, account for time differences on your server, and make sure the posts are still included in the archives.

http://snipplr.com/view/16400/updated-wordpress-post-expiration-code/ ]]></description>
<pubDate>Sun, 28 Jun 2009 09:59:12 GMT</pubDate>
<guid>http://snipplr.com/view/3899/wordpress-post-expiration-code/</guid>
</item>
<item>
<title>shopromo said on 4/11/09</title>
<link>http://snipplr.com/view/3899/wordpress-post-expiration-code/</link>
<description><![CDATA[ Hi, I'd like to use this snippet on a e-couponing website based on Wordpress. But I don't want the expired post to disappear, I just want to add "This coupon code is expired" somewhere in the post when the expiration date is reached. How can I do that ? ]]></description>
<pubDate>Sat, 11 Apr 2009 06:46:35 GMT</pubDate>
<guid>http://snipplr.com/view/3899/wordpress-post-expiration-code/</guid>
</item>
<item>
<title>jakepaint said on 7/15/08</title>
<link>http://snipplr.com/view/3899/wordpress-post-expiration-code/</link>
<description><![CDATA[ <p>to sort by expiration date would be on the tricky side.  Probably the way would be to set up a custom-select-query in word press.  Insert something like this in your template:
$querystr = "
    SELECT wposts.* 
    FROM $wpdb->posts wposts, $wpdb->postmeta wpostmeta
    WHERE wposts.ID = wpostmeta.post<em>id 
    AND wpostmeta.meta</em>key = 'expiration<em>date'  //or whatever your meta key is called
    AND wposts.post</em>status = 'publish' 
    AND wposts.post<em>type = 'post' 
    ORDER BY wpostmeta.meta</em>value ASC
 ";</p>

<p>$pageposts = $wpdb->get_results($querystr, OBJECT);</p>

<p>read more about that method: http://codex.wordpress.org/Displaying<em>Posts</em>Using<em>a</em>Custom<em>Select</em>Query</p> ]]></description>
<pubDate>Tue, 15 Jul 2008 14:12:12 GMT</pubDate>
<guid>http://snipplr.com/view/3899/wordpress-post-expiration-code/</guid>
</item>
<item>
<title>btd1294 said on 7/2/08</title>
<link>http://snipplr.com/view/3899/wordpress-post-expiration-code/</link>
<description><![CDATA[ <p>I am using the code that you provided on a project that I am working on. It works great, the one thing I need is to be able to sort on the expiration date. Can you give me some help with that?</p>

<p>Thanks for the code.</p>

<p>Jeff</p> ]]></description>
<pubDate>Wed, 02 Jul 2008 16:30:53 GMT</pubDate>
<guid>http://snipplr.com/view/3899/wordpress-post-expiration-code/</guid>
</item>
<item>
<title>bujaman said on 6/20/08</title>
<link>http://snipplr.com/view/3899/wordpress-post-expiration-code/</link>
<description><![CDATA[ <p>Great snippet, how would you modify it so that it would delete the post entirely? I am using WP for a retail site and want to have daily specials on a post. I would like to set them up in advance and set the publish time, but would also like to have them expire and be removed so no one can stumble upon them accidentally in the archives.  Thanks for the code.</p> ]]></description>
<pubDate>Fri, 20 Jun 2008 01:45:36 GMT</pubDate>
<guid>http://snipplr.com/view/3899/wordpress-post-expiration-code/</guid>
</item>
<item>
<title>baa said on 4/22/08</title>
<link>http://snipplr.com/view/3899/wordpress-post-expiration-code/</link>
<description><![CDATA[ <p>Could u help me to display posts based on the EXPIRATION date, order=ASC

<p>thanks.baa.</p></p> ]]></description>
<pubDate>Tue, 22 Apr 2008 15:35:49 GMT</pubDate>
<guid>http://snipplr.com/view/3899/wordpress-post-expiration-code/</guid>
</item>
<item>
<title>dwest said on 2/20/08</title>
<link>http://snipplr.com/view/3899/wordpress-post-expiration-code/</link>
<description><![CDATA[ <p>pOOP! the code didn't show up. Sorry!</p>

<p>Here tiz:
</p>
 ]]></description>
<pubDate>Wed, 20 Feb 2008 00:25:49 GMT</pubDate>
<guid>http://snipplr.com/view/3899/wordpress-post-expiration-code/</guid>
</item>
<item>
<title>dwest said on 2/20/08</title>
<link>http://snipplr.com/view/3899/wordpress-post-expiration-code/</link>
<description><![CDATA[ <p>I sort of re-wrote this snippet to do two things:
It allows one to specify time.
It allows one to enter the date as standard U.S.</p>

<p>Your expiration key can now hold the value 02/19/2008 18:25:02 or simlar and the post will expire at that time.</p>

<p>here is the code:
PLACE IN WORDPRESS PAGE JUST AS DIRECTED FOR ORIGINAL SNIPPET</p>

<pre><code>

//WORDPRESS CODE HERE
//ADD CLOSING  STRING AS DIRECTED IN ORIGINAL SNIPPET.
</code></pre>
 ]]></description>
<pubDate>Wed, 20 Feb 2008 00:24:45 GMT</pubDate>
<guid>http://snipplr.com/view/3899/wordpress-post-expiration-code/</guid>
</item>
<item>
<title>dwest said on 2/10/08</title>
<link>http://snipplr.com/view/3899/wordpress-post-expiration-code/</link>
<description><![CDATA[ <p>This is a wonderful snippet. Much needed in WordPress.
I have but one request.
Can it be adjusted so that a date AND TIME can be specified for expiration?</p>

<p>I run auctions for my art at ebay and I want the blog post to expire when the auction expires. Hours and minutes are all that would be needed along with the date.</p>

<p>If it can be done, and you don't have the time, please tell me how and I'll edit the code.</p>

<p>Thanks so much for creating this and making it available.</p>

<p>Have a look at smallartgems.com to see how I'm using it.</p>
 ]]></description>
<pubDate>Sun, 10 Feb 2008 03:12:06 GMT</pubDate>
<guid>http://snipplr.com/view/3899/wordpress-post-expiration-code/</guid>
</item>
<item>
<title>twitchyjordan said on 1/24/08</title>
<link>http://snipplr.com/view/3899/wordpress-post-expiration-code/</link>
<description><![CDATA[ <p>Thank you very much for the code.  I'm trying to create an events blog using WordPress, and this is very handy for only having current events posted in my "Recently added" column.  I've tried adding it to the "Search results" page, and while it works (past events/expired posts won't show up), if there aren't *any unexpired posts the search results end up blank instead of showing up a "no posts found" text.  Any thoughts?</p>
 ]]></description>
<pubDate>Thu, 24 Jan 2008 05:23:48 GMT</pubDate>
<guid>http://snipplr.com/view/3899/wordpress-post-expiration-code/</guid>
</item>
<item>
<title>jakepaint said on 11/16/07</title>
<link>http://snipplr.com/view/3899/wordpress-post-expiration-code/</link>
<description><![CDATA[ <p>Hi, yeah sure.  I changed the code to hopefully be a little more clear.  I'm not familiar with AdClerum, but in the loop begins with:
<code><?php if (have_posts()) : while (have_posts()) : the_post(); ?></code>
so put the first section of my code just <em>after</em> that, and the end of the loop is:
<code><?php endwhile; else:</code>
so put the last line of my code just <em>before</em> that.  My template is a bit different than the standard, so hopefully that will get you working.</p>
 ]]></description>
<pubDate>Fri, 16 Nov 2007 15:07:33 GMT</pubDate>
<guid>http://snipplr.com/view/3899/wordpress-post-expiration-code/</guid>
</item>
<item>
<title>jakepaint said on 11/16/07</title>
<link>http://snipplr.com/view/3899/wordpress-post-expiration-code/</link>
<description><![CDATA[ <p>Hi, yeah sure.  I changed the code to hopefully be a little more clear.  I'm not familiar with AdClerum, but in the loop begins with:
<code><?php if (have_posts()) : while (have_posts()) : the_post(); ?></code>
so put the first section of my code just <em>after</em> that, and the end of the loop is:
<code><?php endwhile; else:</code>
so put the last line of my code just <em>before</em> that.  My template is a bit different than the standard, so hopefully that will get you working.</p>
 ]]></description>
<pubDate>Fri, 16 Nov 2007 15:06:51 GMT</pubDate>
<guid>http://snipplr.com/view/3899/wordpress-post-expiration-code/</guid>
</item>
<item>
<title>eagleout said on 10/22/07</title>
<link>http://snipplr.com/view/3899/wordpress-post-expiration-code/</link>
<description><![CDATA[ <p>Can you give us an example what this code replaces in index.php? Not sure what the "correct stuff" is. I am using the AdClerum template.</p>

<p>Thanks-</p>
 ]]></description>
<pubDate>Mon, 22 Oct 2007 09:56:49 GMT</pubDate>
<guid>http://snipplr.com/view/3899/wordpress-post-expiration-code/</guid>
</item>
</channel>
</rss>
