Over the last few weeks I have been working with Brian Richards to produce a plugin development course for his WPSessions VIP program. Throughout the course, we wrote a plugin from start to finish, and Simple Post Expiration this is that plugin. It’s a simple little plugin that allows you to set an expiration date on posts. Once a post is expired, the title of the post is automatically prefixed with the word “Expired”, or any word you have chosen.

Once activated, the plugin will add a date field to the Publish metabox in the post editor screen. This date field lets you specify an expiration date. Once the expiration date is reached, the post title gets automatically prefixed with “Expired”. If your post was titled “Great Deals for the Summer”, it would show up as “Expired: Great Deals for the Summer” once expired.

Along with automatically prefixing titles of expired posts, the plugin includes two additional options: a short code and a widget.

The [expired] short code lets you display the expiration date of the post within the post content. It also accepts several parameters to modify the exact text that is displayed (see the plugin page on WordPress.org for details).

The Expired / Expiring Posts widget lets you display a list of posts that are either expired or expiring soon, similar to the Recent Posts widget,


You can read more about the course and see an introduction video in the post I wrote a few weeks agocourse overview page on WPSessions.

Download Plugin

  1. Jan Bosman

    Nice, Pippin!

    Only thing I can think to add to it would be an option to set an expiring post back to Draft status as of the expiration date.

    • Pippin

      It wouldn’t be very hard to do that. I may add it in an update 🙂

    • alex

      Greater if it would be an option to define if we want to set all expiring posts back to draft, pending or trash. 😉

      By the way, does it works with EDD products?

    • Pippin

      Yes it will work with EDD products.

    • Manuel

      Hi,
      How about grouping expired/active posts by category? I run a blog where dated posts are mostly within two or three categories (out of 11 categories). Right now, if i understand the plugin correctly, it seems that this is not possible. True?

    • Pippin

      Thanks for the suggestion. I’ll keep that in mind for the future!

  2. carosch

    Hello, I have a problem with your plugin can I have help please ?

    • Pippin Williamson

      Could you tell me more about the exact problem you’re encountering?

  3. carosch

    I sent you an email with the complete description of my problem with the contact page form.
    It’s about add a class to an expired post.
    Did you receive it ?
    Caroline

    • Pippin

      I have received it and will reply as soon as I am able.

  4. Sam

    It is amazing plugin, could you please let us know when the new update will come with the option of moving the expired posts to draft? or if possible some guidance of how we could apply that, especially for someone not a developer yet same as me.
    Thanks in advance

Comments are closed.