• Is there a plugin/hack for WP1.2 that would allow you to set a date that a Post should expire, and have it removed from the list of posts, maybe have it marked as private or something like that?

Viewing 15 replies - 1 through 15 (of 17 total)
  • I cannot recall such a plugin.
    Would I be right in thinking you mean selected posts, not all posts ?

    Thread Starter kcomphlint

    (@kcomphlint)

    Right. Selected posts. For instance, If you are using WP to post information about events that occur on certain dates, and you don’t want to have to login all the time and remove events that have occured and such.

    Just thinking out loud:
    ‘automated’
    want a meta-flag that is the expiry date. checks maybe once per day for posts matching or exceeding their expiry date that aren’t marked private, and marks them such.
    ‘constant’
    same meta-flag, however have the post loop include a join testing the meta flag as part of its query for active articles.
    -d

    I may be missing something, as I’m very new to WordPress, but if WordPress is delivered via PHP / MySQL then wouldn’t activating post expiry be as simply as changing the SQL statements that draw the posts to something like this pseudo statement:
    SELECT * from tblposts where displaydate > Now() and expiredate < Now()
    I’m not suggesting the actual statement(s) would be that simple, but the point is, WordPress seems to dynamically draw its posts from the underlying database when each page is requested. You shouldn’t need Cron jobs etc to exclude expired posts, it should be possible to exclude them using the SQL that pulls the posts for display.
    Again, could be wildly wrong.
    Regards,
    Murray

    In davidchait’s post, the ‘constant’ option would use SQL to exclude expired posts. The only way I can see for his ‘automated’ option to work would be with something like cron.
    My ‘purge’ idea would allow the admin to clear out expired posts in order to reduce space taken up in the table.

    I confess, I don’t quite understand what is meant by the ‘automated’ option.
    Would people want to purge old articles, even if they’re not visible anymore? Chances are, the moment they’re purged, someone is going to want the details again.
    At worst, you could offer an admin purge process, which is probably more in keeping with maintaining the application contained within a PHP / MySQL solution base, rather than having to rely on timed cron jobs, which may or may not be available to some people wishing to use WordPress.
    However, speaking as someone who would like to have the ‘expire’ functionality, I wouldn’t want posts automatically purged, unless there was another flag at post creation / edit time to control this behaviour.
    As another alternative, an admin page that displays all expired articles and allows you to select those you wish to be purged?

    Has anyone managed to develop such a plug-in yet. It’s one of the more helpful features of, e.g., Drupal and Mambo.

    It would be great if we could set a post to go live at a specific date and vanish into the archives at a set date. (I’m thinking mostly of those who use their WP sites like a mini-CMS.)

    This link to the old Wiki explains how to do it with a few lines of code and a custom field:

    https://wiki.www.ads-software.com/?pagename=ExpirePosts

    Works in 1.5 too ?? Is this what you wanted?

    Sokrates,

    You better back away, ‘cos I am filled with love for you right now and I might end up hugging ya! ??

    That’s exactly what I wanted to do!

    Thanks.

    u r welcome. nice site by the way!

    Thanks! ??

    How do u do the rotating image, btw?

    Dan Benjamin wrote the script

    His website : https://hivelogic.com/showroom.php

    & A List Apart (excellent site):

    https://www.alistapart.com/articles/betterrotator/

    I’m half tempted to switch the header to a .swf client side job, rotator.php does seem to be a little processor/server intensive – a bit if a problem if you’re on a budget server ??

    Ah, thanks.

    I know ALA. They are responsible for getting me to my current level of incompetence. But I must have missed that.

    Thanks again.

    And now that wiki page is lost… evidently. Anybody know what that code was?

    I use the EventCalendar 3 plugin for coming events… They vanish out of the list once they are past. But I’d love to know how to make other, non-calendar posts expire…

    Rich,

    I was able to find it by searching Google’s cache. It didn’t show it at first, so I just did a text only cache. Check it out:

    https://64.233.167.104/search?q=cache:9TRBl6QO8lUJ:wiki.www.ads-software.com/?pagename=ExpirePosts+&hl=en&lr=&strip=1

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘Post expires after set date or number of days.’ is closed to new replies.