Passer la navigation

[Résolu] Bulk expire posts of a certain type depending on the role of related User

This support ticket is created Il y a 1 year, 6 months. There's a good chance that you are reading advice that it now obsolete.

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 -

Fuseau horaire du supporter : Asia/Kolkata (GMT+05:30)

Ce sujet contient 3 réponses, a 1 voix.

Dernière mise à jour par Minesh Il y a 1 year, 6 months.

Assisté par: Minesh.

Auteur
Publications
#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?
lien caché

#2786195

Minesh
Supporter

Les langues: Anglais (English )

Fuseau horaire: 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:
- lien caché

#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

Les langues: Anglais (English )

Fuseau horaire: 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/