Skip Navigation

[Resolved] Automatic post expiration permenently in Toolset forms

This thread is resolved. Here is a description of the problem and solution.

Problem:

I have Membership Website of Expert Witnesses and they are adaments that they want the post removed from the WordPress Database after this 14 days. I've read that WordPress automatically keeps items in the Trash for 30 days then removes them entirely from the system. Is there a way with Toolset to have these posts removed entirely from the WordPress Databased when they are set to expire?

Solution:

There isn't such a built-in feature with Toolset, you might consider custom codes, for example:

https://toolset.com/forums/topic/automatic-post-expiration-permenently-in-toolset-forms/#post-1215293

Relevant Documentation:

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

This topic contains 2 replies, has 2 voices.

Last updated by Ronald E 2 years, 7 months ago.

Assigned support staff: Luo Yang.

Author
Posts
#1215210

I have a content form set to automatically expire a post after 14 days and it's set to move to trash.

I have Membership Website of Expert Witnesses and they are adaments that they want the post removed from the WordPress Database after this 14 days. I've read that WordPress automatically keeps items in the Trash for 30 days then removes them entirely from the system. Is there a way with Toolset to have these posts removed entirely from the WordPress Databased when they are set to expire?

My clients do not want any records of there comments to be reclaimed by court orders which is happens with expert witnesses.

#1215293

Luo Yang
Supporter

Languages: English (English ) Chinese (Simplified) (简体中文 )

Timezone: Asia/Hong_Kong (GMT+08:00)

Hello,

No there isn't such a built-in feature with Toolset, you might consider custom codes, for example use action hook wp_trash_post to delete the post from database.

More help:
https://developer.wordpress.org/reference/hooks/wp_trash_post/
https://developer.wordpress.org/reference/functions/wp_delete_post/

#1215527

My issue is resolved now. Thank you!