WPBeginner

Beginner's Guide for WordPress

  • Blog
    • Beginners Guide
    • News
    • Opinion
    • Showcase
    • Themes
    • Tutorials
    • WordPress Plugins
  • Start Here
    • How to Start a Blog
    • Create a Website
    • Start an Online Store
    • Best Website Builder
    • Email Marketing
    • WordPress Hosting
    • Business Name Ideas
  • Deals
    • Bluehost Coupon
    • SiteGround Coupon
    • WP Engine Coupon
    • HostGator Coupon
    • Domain.com Coupon
    • Constant Contact
    • View All Deals »
  • Glossary
  • Videos
  • Products
X
☰
Beginner's Guide for WordPress / Start your WordPress Blog in minutes
Choosing the Best
WordPress Hosting
How to Easily
Install WordPress
Recommended
WordPress Plugins
View all Guides

WPBeginner» Blog» Plugins» How to Expire Posts or Partial Post Content in WordPress

How to Expire Posts or Partial Post Content in WordPress

Last updated on April 7th, 2015 by Editorial Staff
90 Shares
Share
Tweet
Share
Pin
Free WordPress Video Tutorials on YouTube by WPBeginner
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.

90 Shares
Share
Tweet
Share
Pin
Popular on WPBeginner Right Now!
  • Checklist

    Checklist: 15 Things You MUST DO Before Changing WordPress Themes

  • Google Analytics in WordPress

    How to Install Google Analytics in WordPress for Beginners

  • How to Fix the Error Establishing a Database Connection in WordPress

    How to Fix the Error Establishing a Database Connection in WordPress

  • Revealed: Why Building an Email List is so Important Today (6 Reasons)

    Revealed: Why Building an Email List is so Important Today (6 Reasons)

About the Editorial Staff

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi. Trusted by over 1.3 million readers worldwide.

The Ultimate WordPress Toolkit

17 Comments

Leave a Reply
  1. Jazzper says:
    Aug 28, 2020 at 11:15 pm

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

    Reply
    • WPBeginner Support says:
      Aug 31, 2020 at 1:48 pm

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

      Reply
  2. Andreas S says:
    Feb 15, 2019 at 12:48 pm

    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.

    Reply
    • WPBeginner Support says:
      Feb 18, 2019 at 1:45 pm

      It sounds like you’re wanting to use reusable blocks. We have a tutorial on how to use those here: https://www.wpbeginner.com/beginners-guide/how-to-create-a-reusable-block-in-wordpress/

      Reply
  3. Syaifuddin says:
    Jan 10, 2019 at 3:14 am

    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.

    Reply
    • WPBeginner Support says:
      Jan 10, 2019 at 11:55 am

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

      Reply
  4. David says:
    Feb 15, 2017 at 5:29 pm

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

    Reply
    • Stacey says:
      Feb 14, 2019 at 4:31 pm

      @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!

      Reply
      • WPBeginner Support says:
        Feb 15, 2019 at 10:11 am

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

        Reply
        • Stacey says:
          Feb 15, 2019 at 4:07 pm

          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. Andrew Norton says:
    Nov 11, 2016 at 7:44 am

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

    Reply
  6. Thembelani says:
    Jul 14, 2016 at 5:42 am

    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 ?

    Reply
  7. Yazmin says:
    Jun 29, 2016 at 12:41 pm

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

    Thanks!

    Reply
  8. Michaelsbote says:
    Mar 13, 2016 at 5:05 am

    Sorry – The Post Expirator does not work with WP 4.4.2.

    Reply
  9. John Bowden says:
    Apr 26, 2015 at 10:51 am

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

    Reply
  10. george pal says:
    Apr 1, 2015 at 1:31 am

    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:

    Reply
  11. Leslie Nicole says:
    Mar 22, 2015 at 10:55 am

    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!

    Reply

Leave a Reply 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.

Over 1,320,000+ Readers

Get fresh content from WPBeginner

Featured WordPress Plugin
WP Mail SMTP logo
WP Mail SMTP
Fix WordPress email delivery issues. #1 SMTP plugin. Learn More »
How to Start a Blog How to Start a Blog
I need help with ...
Starting a
Blog
WordPress
Performance
WordPress
Security
WordPress
SEO
WordPress
Errors
Building an
Online Store
Useful WordPress Guides
    • 7 Best WordPress Backup Plugins Compared (Pros and Cons)
    • How to Fix the Error Establishing a Database Connection in WordPress
    • Why You Need a CDN for your WordPress Blog? [Infographic]
    • 30 Legit Ways to Make Money Online Blogging with WordPress
    • Self Hosted WordPress.org vs. Free WordPress.com [Infograph]
    • Free Recording: WordPress Workshop for Beginners
    • 24 Must Have WordPress Plugins for Business Websites
    • How to Properly Move Your Blog from WordPress.com to WordPress.org
    • 5 Best Contact Form Plugins for WordPress Compared
    • Which is the Best WordPress Popup Plugin? (Comparison)
    • Best WooCommerce Hosting in 2020 (Comparison)
    • How to Fix the Internal Server Error in WordPress
    • How to Install WordPress - Complete WordPress Installation Tutorial
    • Why You Should Start Building an Email List Right Away
    • How to Properly Move WordPress to a New Domain Without Losing SEO
    • How to Choose the Best WordPress Hosting for Your Website
    • How to Choose the Best Blogging Platform (Comparison)
    • WordPress Tutorials - 200+ Step by Step WordPress Tutorials
    • 5 Best WordPress Ecommerce Plugins Compared
    • 5 Best WordPress Membership Plugins (Compared)
    • 7 Best Email Marketing Services for Small Business (2020)
    • How to Choose the Best Domain Registrar (Compared)
    • The Truth About Shared WordPress Web Hosting
    • When Do You Really Need Managed WordPress Hosting?
    • 5 Best Drag and Drop WordPress Page Builders Compared
    • How to Switch from Blogger to WordPress without Losing Google Rankings
    • How to Properly Switch From Wix to WordPress (Step by Step)
    • How to Properly Move from Weebly to WordPress (Step by Step)
    • Do You Really Need a VPS? Best WordPress VPS Hosting Compared
    • How to Properly Move from Squarespace to WordPress
    • How to Register a Domain Name (+ tip to get it for FREE)
    • HostGator Review - An Honest Look at Speed & Uptime (2020)
    • SiteGround Reviews from 4196 Users & Our Experts (2020)
    • Bluehost Review from Real Users + Performance Stats (2020)
    • How Much Does It Really Cost to Build a WordPress Website?
    • How to Create an Email Newsletter the RIGHT WAY (Step by Step)
    • Free Business Name Generator (A.I Powered)
    • How to Create a Free Business Email Address in 5 Minutes (Step by Step)
    • How to Install Google Analytics in WordPress for Beginners
    • How to Move WordPress to a New Host or Server With No Downtime
    • Why is WordPress Free? What are the Costs? What is the Catch?
    • How to Make a Website in 2020 – Step by Step Guide
Deals & Coupons (view all)
Liquid Web
Liquid Web Coupon
Get 50% OFF on Liquid Web managed WordPress hosting plans for 3 months. From just $9.50.
Gator Website Builder Coupon
Get 55% OFF on Gator Drag & Drop Website Builder by HostGator.
Featured In
About WPBeginner®

WPBeginner is a free WordPress resource site for Beginners. WPBeginner was founded in July 2009 by Syed Balkhi. The main goal of this site is to provide quality tips, tricks, hacks, and other WordPress resources that allows WordPress beginners to improve their site(s).
Join our team: We are Hiring!

Site Links
  • About Us
  • Contact Us
  • FTC Disclosure
  • Privacy Policy
  • Terms of Service
  • Free Blog Setup
  • Free Business Tools
Our Sites
  • OptinMonster
  • MonsterInsights
  • WPForms
  • SeedProd
  • Nameboy
  • RafflePress
  • Smash Balloon

Copyright © 2009 - 2021 WPBeginner LLC. All Rights Reserved. WPBeginner® is a registered trademark.

Managed by Awesome Motive | WordPress hosting by SiteGround | WordPress CDN by MaxCDN | WordPress Security by Sucuri.