Forum
Perch Region Auto-Delete Function?
Hello everyone,
I'm inquiring on a possible function, if said function exists.
I'm looking for a perch region option that deletes the region after a set time.
For example, a job posting that disappears after a certain date without the user logging in and manually deleting the region.
Cheers, Matt
Hello Matthew,
In the case of a job posting, you would add a date field to the region and use the filtering options with
perch_content_custom()
to only display the region before that date.https://docs.grabaperch.com/functions/content/perch-content-custom/#filtering-content
If you want to set a closing date in the content itself, use a filter. Here the filter assumes the content has a date field called
expires
.Thanks guys! Much appreciated. This ended up working for me.