I would like to add a date field to my CPT which will action the post to archive instead of auto archiving as per default WordPress settings. Is it possible to designate the folder it archives to?
Hello,
Please elaborate the questions with more details:
Is it possible to designate the folder it archives to?
What folder are we talking about? How do you want the post be archived?
Toolset Forms plugin provides "Post Expiration" feature, and you can setup the Expiration date in WP admin side or frontend with post forms, after post expired, the post status will be changed, see our document:
https://toolset.com/course-lesson/setting-up-automatic-post-expiration/
Morning, I would like to have the option to choose a folder/category already created to archive to. Reason being is that tender documents will be loaded that need to have a expiration date. They need to however for record keeping purposes still be available in future, hence the reson for the archive folder. Example would be to have a "Tenders 2021" category/folder and a "Tenders 2021 Archives" category / folder
I assume you are going to add some specific taxonomy terms into the expired posts.
If it is, it needs custom codes, for example, after post is expired, you can use action hook "cred_post_expiration_custom_actions" to trigger a PHP function:
https://toolset.com/documentation/programmer-reference/cred-api/#cred_post_expiration_custom_actions
In this PHP function, setup the taxonomy terms of the expired posts:
https://developer.wordpress.org/reference/functions/wp_set_object_terms/
My issue is resolved now. Thank you!