How to Enable Post Expiration Dates in WordPress

Chưa được phân loại

Once your WordPress website has been around for a while, chances are you’ll have a sizable library of content. However, not every piece needs to stay up indefinitely. Temporary promotions, for example, should come down once they run their course, to avoid confusing visitors. That’s why enabling post expiration dates in WordPress can be a smart move.

Post expiration dates make it, so you don’t have to remove content by hand once it’s outdated. You just set a date, and the plugin does the work for you. It’s an easy way to ensure that your content remains evergreen.

In this article, we’re going to talk about why you may want to include temporary content on your website. Then, we’ll teach you how to enable post expiration dates in WordPress and talk about what to do afterward. Let’s get to it!

Why you might want to include temporary content on your website

Some types of content, such as promotions and private offers, are time-sensitive. If users run into such posts when they’re no longer relevant, it can lead to some confusion. Plus, there are plenty of other kinds of content that can result in similar problems:

  1. Yesterday’s news. For example, consider things like your favorite TV series. Although talking about the possible developments that might show up is cool, the discussion loses its value the second that the new episode airs. At this point, nobody cares about “what you thought was going to happen.” This is just an example, but it’s easy to imagine similar scenarios in different areas or niches.
  2. Seasonal articles. Pieces about the best Christmas-based somethings or the most popular products of 2015 run their course quickly. Once some time has passed, they become less relevant and are simply cluttering up your site.

Naturally, these aren’t the only types of content you should consider removing from your website at a set point. What pages and posts fall under this category depends on the focus and goals of your WordPress site, and you’ll need to review your content periodically to determine if some of it should go.

An example of post expiration dates in WordPress.

Not all WordPress content is meant to stay up forever.

As you probably know, WordPress makes it easy to remove posts from your site. All it takes is a couple of clicks. However, that can add up to a lot of lost time, depending on how large your library is and how many posts you need to get rid of. The best course of action is to find a way to implement post expiration dates in WordPress, so the platform will remove that content automatically.

How to enable post expiration dates in WordPress (using the Post Expirator plugin)

The easiest way to automate post expiration in WordPress is by using a plugin. In this case, we’ve chosen Post Expirator for its ease of use. Plus, this particular tool also works for pages and custom post types, making it a one-size-fits-all solution. Go ahead and install the plugin now, then move on to the first step.

⚠️ Important! This plugin hasn’t been updated in a while. Although it works just fine right now, be careful using it with a modern version of WordPress in the future.

Step #1: Configure Post Expirator’s notification settings

Post Expirator will do its job without a lot of customization or tweaking required. However, there’s one setting in particular that you’ll likely want to configure, to make your job easier. To get started, navigate to the SettingsPost Expirator screen from your WordPress dashboard, and look for the section called Expiration Email Notification:

Configuring the Post Expirator plugin.

In this section, you can enable notifications that will be sent whenever one of your posts or pages expires. You have the option of emailing every administrator or entering a specific address that should receive the messages. In our experience, it’s always a smart idea to turn these notifications on. This way, you’ll know when the content is gone and have the option of restoring it if you’ve changed your mind.

Once you’ve chosen how you want to receive notifications, you can move on to the next step.

Step #2: Enable post expiration dates for your content

After enabling the plugin, you’ll find a new widget next to the WordPress editor on all your posts and pages. As you’ll notice, post expiration dates aren’t enabled by default, since that would affect all of your content.

If you want a particular piece of content to expire, the first thing you have to do is tick that option and then choose an expiration date. You can set the date down to the minute and decide what happens when it occurs. For example, you can tell the plugin to delete the content outright:

Setting an expiration date for your content.

Alternately, you can simply set the post to “private,” if you want to keep your options open for later. Post Expirator also enables you to “stick” and “unstick” posts, or return them to draft format. You’re free to use any option you want, but we recommend sending posts to the trash to keep your library uncluttered. If you enabled email notifications earlier, you’ll have more than enough time to restore the content from your deleted articles before it’s gone forever.

Moving forward, you simply need to configure these options for any content you want to expire. Plus, you can also sort through your library and set expiration dates for any existing content that you want to be temporary.

What to do once your WordPress content expires

Enabling post expiration dates in WordPress is simple, but you still have a potential problem to deal with after the content has been removed. Some of your visitors may have bookmarked those pages to return at a later date. If they use those bookmark links now, they’ll encounter an error.

Fortunately, we’ve written extensively about how to deal with 404 errors in the past. The easiest way to handle this issue is by using the Redirection plugin to send visitors back to your home page, or any other part of your site you want.

Alternatively, you can create a custom 404 page that explains why nothing is available at that link. This option involves a bit more work, but can be better in the long term, since users will be informed about why they can’t find the posts they’re looking for. Plus, creating custom 404 pages can be handled using plugins such as 404page:

This particular plugin has been tested extensively with our own Neve theme, and is simple to get started with. Plus, your visitors will appreciate the extra effort you’ve taken to ensure they aren’t confused by the missing content.

Conclusion

It can seem like a bad idea to take down any of the articles on your site, but it’s actually a great way to keep your library lean and evergreen. Plus, it makes sense for certain types of posts to remain up only for a while, such as discount offers and time-sensitive articles.

With that in mind, here’s how to enable post expiration dates in WordPress using the Post Expirator plugin:

  1. Configure the plugin’s notification settings.
  2. Add expiration dates to the content you want to be removed automatically.

Do you have any questions about how to enable post expiration dates in WordPress? Ask away in the comments section below!

Free guide

5 Essential Tips to Speed Up
Your WordPress Site

Reduce your loading time by even 50-80%
just by following simple tips.

Bài viết liên quan

Trả lời

Email của bạn sẽ không được hiển thị công khai.