Is there a function to trash a post when a custom field (date-picker) is older than today?
Hi @leuchterits
For something like that, you need to use wp_cron to check the post periodically. You can get the post by querying it based on the date picker field. This page should give you more idea about it: https://www.advancedcustomfields.com/resources/query-posts-custom-fields/.
I hope this helps 🙂