Beginner's Guide for WordPress / Start your WordPress Blog in minutes

How to Expire Posts or Partial Post Content in WordPress

Have you ever wished that you can set an expiration date for your blog posts? Perhaps you have timely content such as deals or giveaways that have been outdated which you want to automatically expire? In this article, we will show you how to expire posts and pages in WordPress. We will also show you how to schedule part of your post or page content to be expired after a specific date.

Expire Post Content

When would you want to expire posts or partial post content?

The primary use case of post expiration is to expire time-sensitive content such as special deals, coupons, giveaways, and event announcements.

In certain cases, you may want to keep the post active on your site because it is helpful, but only expire partial content such as a special limited-time discount coupon which no longer works..

First let’s take a look at how to expire posts, then we will look at how to expire partial post content.

Video Tutorial

Subscribe to WPBeginner

If you don’t like the video or need more instructions, then continue reading.

How to Expire Posts in WordPress?

There are ways to customize the WordPress loop with PHP codes and utilize custom fields to make this happen, but that is too much work. Let’s take a look at an easier solution: Post Expirator plugin.

First thing you need to do is install and activate the plugin. Once activate, go to edit any WordPress post or page, and you will see a new metabox like this:

Post Expirator - WordPress Plugin

You can enable the post expiration and select the date / time that you want this post to expire on.

You are probably wondering what happens to the post once it is expired. Well, you get to decide that. There are several options to choose from.

You can either make it a draft (unpublish it), set it to private, delete the post altogether, or you can change the post category.

You also have additional settings that you can configure from the settings page found under Settings » Post Expirator.

Post Expirator Settings - WordPress Plugin

You can choose the date and time format along with the default expiration category. You also have the option to add the post expiration date at the end of your content to let your users know when this post or page will be expiring.

Post Expirator Footer Settings - WordPress Plugin

Another plugin that offers similar functionality is called Simple Post Expiration.

How to Expire Partial Post Content in WordPress

The above method shows you how to expire the entire post or page, but in some cases that is not what you want. You may just want to remove part of the post or page content after a certain time. Well in that case, the plugin called Scheduled Content is your best solution.

This plugin allows you to schedule part of your post content to be published and expired based on the dates you specify.

First thing you need to do is install and activate the plugin. Once you have done that, there are no additional settings. All you need to do is wrap your content with the shortcode and set the date/time you’d like it to expire on. When that time arrives, this content will disappear and no longer be visible to your users.

[schedule on=’2014-12-01′ at=”10:01″ expon=’2014-12-01′ expat=”13:15″] the content you want to hide here [/schedule]

The date has to be set in yy-mm-dd format, and time has to be set in the 24 hours format.

The time is compared with your blog’s time zone settings, so make sure you have the right time zone by going to Settings » General.

You can also add shortcodes inside this schedule shortcode as well.

We hope this article helped you learn how to expire posts in WordPress and expire partial post and page content in WordPress.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

Disclosure: Our content is reader-supported. This means if you click on some of our links, then we may earn a commission. See how WPBeginner is funded, why it matters, and how you can support us.

The Ultimate WordPress Toolkit

Get FREE access to our toolkit – a collection of WordPress related products and resources that every professional should have!

Reader Interactions

17 CommentsLeave a Reply

  1. Apparently this plugin is no longer supporter by its developer. Are there any plugins available that ARE supported which expire posts?

    • We will be sure to look for an alternative we would recommend and update this article when we are able.


  2. Hi! Do you know any plugins where I can make limited content and spread around my page with shortcodes? I have a website with different online stores that often have limited offers. It would be great to have a database of all the stores… Store1, Store2, Store3…. and then I apply a store specific shortcode in all the stores… and a database of text portions with dates I can change whenever new campaigns come out.. Sorry for the very bad explanation…. I tried the Timed Content plugin but it didn’t work exactly as I wanted.

  3. Hello,

    I just bump into this post while looking for a solution where WP can automatically draft all posts after certain period. For instance if I publish the post on 1st January, it will automatically unpublish (status change to draft or expired) on 31st January. If the post was published on 4 March, it will expires on 5 May.

    I need this feature because I want to set specific time for my subscriber to read the post within allowable time before it’s hidden/unpublish from front end.

    Please help.

    • From the sound of what you’re wanting, you would want to use the plugin in the article.


  4. Hey WPbeginner: How can we do this NOW? The plugin in the article hasn’t been updated in more than 2 years…

    • @David, Did you find an updated way to do this? I’m also looking for a way to expire posts without using an abandoned plugin!

      • We will certainly take a look at other plugin options but the plugin should still be working for the moment.


        • I tried for days to get this plugin to work and never could. I ended up finding the plugin “WP Content Scheduler With Range”. Even with trying out abandoned plugins, this is the only one I could get to work.

  5. This plugin works like a dream however i want the same thing or functionality for posts in widgets. any ideas?

  6. Hi. We are trying to build a mobile app that pulls content from a WordPress page as JSON using a url. The page in WordPress uses Advanced Custom Fields as its underlying structure. None of the content expiry plugins I have tried thus far are able to show/hide content on this page.

    Any suggestions ?

  7. Is there a new alternative to Post Expirator? It is failing on our site all of a sudden and we rely on it heavily.


  8. Just replaced a plugin that no longer worked with Post Expirator. Working like a champ on my site. Thank you!

  9. I have tested Post Expirator plugin on a multisite installation.
    The plugin DOES NOT work.
    As soon as it gets enabled there is a php message telling:

    Strict Standards: Declaration of Walker_PostExpirator_Category_Checklist::start_lvl() should be compatible with Walker::start_lvl(&$output, $depth = 0, $args = Array) in /volume1/web/wp-content/plugins/post-expirator/post-expirator.php on line 0
    Strict Standards: Declaration of Walker_PostExpirator_Category_Checklist::end_lvl() should be compatible with Walker::end_lvl(&$output, $depth = 0, $args = Array) in /volume1/web/wp-content/plugins/post-expirator/post-expirator.php on line 0
    Strict Standards: Declaration of Walker_PostExpirator_Category_Checklist::start_el() should be compatible with Walker::start_el(&$output, $object, $depth = 0, $args = Array, $current_object_id = 0) in /volume1/web/wp-content/plugins/post-expirator/post-expirator.php on line 0
    Strict Standards: Declaration of Walker_PostExpirator_Category_Checklist::end_el() should be compatible with Walker::end_el(&$output, $object, $depth = 0, $args = Array) in /volume1/web/wp-content/plugins/post-expirator/post-expirator.php on line 0

    Except from that, the metabox on wordpress backend admin breaks the responsive layout, see what I mean here: and here:

  10. Thank you! I’ve been reluctant to post “news” as you end up having your archives peppered with out-dated posts. This is plug-in should be really handy!

Leave a Reply to george pal Cancel reply

Thanks for choosing to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and your email address will NOT be published. Please Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.