Trying to make certain posts expire in WordPress 2.0 (4 posts)

  1. Paola
    Posted 9 years ago #

    After spending the greater part of the last 8 hours trying without success to make this work.
    I have searched WordPress.org, and on Google for a plugin or other solution.

    First I found: http://www.sitpic.com/rotea-expire-posts.phps -- to which the links do not work
    any longer, because apparently the plugin stopped working for unknown reasons around the first of
    the year

    -- I finally came upon some code here:



    in addition to this old discussion: http://wordpress.org/support/topic/10546

    I tried everything suggested, including rereading "Loop" articles in the Wiki.

    I added the following to the loop in the theme's index.php file. My theme uses single.php not post.php, though
    I'm not sure that even applies:

    <?php list ($post_expired) = get_post_custom_values('postexpire'); /* only pay attention to the first one if there's a duplicate */ ?>
    <?php if ( !$post_expired || current_time('mysql') < $post_expired) : /* if there's no expiration date or it's not been reached yet, go ahead with displaying the post */ ?>

    After adding the above code and trying to view the site, the index.php (website's homepage) is BLANK. Remove the code
    from the index.php file and the front page of the blog/website displays perfectly.

    I'm not sure if there is something that has changed in WordPress 2.0, but I really would like to get this working
    so that everyone has the option of expiring posts. According to what I've read this will still make the posts
    accessible from the admin section, but they will not be viewable on the site. This is perfect for my purposes,
    and I cannot believe this isn't already a hot plugin.

    Any help on what I am doing wrong would be helpful. I did already add the key of postexpire and followed
    the instructions at http://www.bonniewren.com/2005/postexpire.htm for the value. I've really exhausted
    every avenue I can think of to try.

  2. moshu
    Posted 9 years ago #

    From the time the wiki was used... a lot of things have been changed. The actual documentation is at the Codex. The old wiki is there only for the historians :) = pre-1.5 versions.

    I think it's not a hot plugin because bloggers love if people are reading their posts - even the old ones;)

  3. emeff
    Posted 9 years ago #

    Have you tried Posts Expire?

    You can define an expiring date when you write a post and it seems to work (and without editing your loop...).

  4. Paola
    Posted 9 years ago #

    Thank you so much! I looked all over for a plugin like this and it's exactly what I was looking for. Not the first time Google was of no help in finding it.

    I guess I'm joining the bloggers who are monetizing their specialized knowledge. It's easier to do that if everything you've ever written about how to do something is not available on your site.

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.