Skip Navigation

Setting up Automatic Post Expiration in WordPress

You can set posts created by Toolset forms to automatically expire after a specified period. This is useful when you have content that can be created by users and you only want the posts to be visible for a specified period.

Duration

An example would be a site that accepts adverts from users. The user might pay for placing the ad on the site, and it might only be shown for 30 days.

Enabling Automatic Expiration of Posts

You can enable automatic expiration of posts from the Forms tab, on the Toolset Settings page. You can have posts checked for expiration once hourly, twice daily, or once daily.

Toolset Forms settings for post expiration

Using Automatic Expiration on Toolset forms

The Toolset form editor has an option in the Settings section for setting an Automatic Expiration Date per form. From here, you can enable automatic expiration for a form and set the expiration time. The expiration time can be set in minutes, hours, days or weeks.

You can also set what happens after expiration. The new post status can be set to the following:

  • Keep original status
  • Draft
  • Pending review
  • Private
  • Published
  • Trash
Forms post expiration options in a form
Forms post expiration options in the form editor

Sending email notifications when posts expire

When you enable automatic expiration for a form, a new option is available in the notifications for the Toolset form. You can choose to send a notification message in an amount of minutes, hours, days or weeks before the post will expire.

In the following image, we notify the user who created the advert that it is going to expire in 5 days.

Forms settings for email notifications when posts expire
Form settings for email notifications when posts expire

Post Expiration settings in the WordPress post editor

When Forms creates posts that are set to expire, the expiration time is also shown in the post editor.

You can manually change the expiration date and status for each post.

Forms settings for email notifications when posts expire
Post expiration settings in the post editor
Updated
septembre 15, 2020