Skip Navigation

[Resolved] Bulk expire posts of a certain type depending on the role of related User

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 3 replies, has 1 voice.

Last updated by Minesh 2 months ago.

Assisted by: Minesh.

Author
Posts
#2786175

Jim

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

#2786195

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Toolset offers post expiration feature for the posts you create using Toolset forms. Please check the following Doc:
=> https://toolset.com/course-lesson/setting-up-automatic-post-expiration/

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

#2786708

Jim

I understand how to do this on an individual post basis. I need to do it in bulk.

I may have to do this directly on the database I suppose.

#2786763

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Yes - you may have to write such script or check the following plugin if that may help you:
- https://wordpress.org/plugins/auto-post-expiration/