I’m using the structure field to create some kind of calender on one of my sites. If the date of the (structure field) post is over, the post is no longer displayed in the frontend. So far so good.
Now my question: Is there a way to auto delete (structure field) posts if their date is over? I know I can do this by hand but … I’m lazy.
You could either use a hook that runs some code when the page is updated. Or you could use a cron job that triggers a script at given intervals. You could also manually trigger a cleanup via a route or tie this to a button.
Ok, I already had the idea with the hooks, too. Then I wasn’t wrong with that. Nice. But what I ask myself is the following: how can I actually delete older (structure field) posts?