How do I get all pages of a certain type in PHP (in a plugin)?

Hey there,

that is a fair question! I wasn’t fully aware of the unpublish_date especially. The thing is, these events can potentially have an end date… also I have set up an extra tab with only the relevant fields to fill out, to make it easier for my clients who are very usually not tech savvy at all. I guess I could repurpose the publish_date field for the start date, but it might result in some confusion. And setting the unpublish_date just adds an extra field to fill out with the same data as the start date.

– But I might repurpose the unpublish_date field as the start date, now that would be something! That would save a bit of date checking in the templates. I will think about that for a bit; it sounds like a good idea for my use cases, but other people might have different requirements. Still, thank you for telling me about it! :slight_smile:

(And if you happen to know how to actually delete pages, that question is still unanswered…)