Tell us what you are trying to do?
I have a custom post type, each instance of which has a related User in the system. I want to be able to set the expiry (or expire immediately) all of the instances of this post type that have a related User with a specific role.
Is there any documentation that you are following?
No
Is there a similar example that we can see?
No
What is the link to your site? hidden link
You can set the post expiration after number of days, weeks or months.
Are you using Toolset forms to set post expiration? if no, then you will have to use some custom solution. For instance, following link may help you:
- hidden link