Skip Navigation

[Fermé] Define a limited publish time for a post created with Cred

The Toolset Community Forum is closed, for technical support questions, please head on to our Toolset Professional Support (for paid clients), with any pre-sale or admin question please contact us here.
This support ticket is created Il y a 10 années et 5 mois. There's a good chance that you are reading advice that it now obsolete.
This is the community support forum for Types plugin, which is part of Toolset. Toolset is a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients and people who registered for Types community support can post in it.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9: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/Hong_Kong (GMT+08:00)

This topic contains 5 réponses, has 2 voix.

Last updated by Luo Yang Il y a 10 années et 5 mois.

Assisted by: Luo Yang.

Auteur
Publications
#153731

Pat

Hello,
I would like to know if it is possible to define a publish timing when creating a paid post with Cred. I'd like for example to let the post "visible" only during 3 month and cancel it thenafter.
Thanks
Pat

#154338

Hi Pat,

What is the "paid post" you mentioned above?
You can try CRED action hook "cred_save_data" to define the publish time of post when creating a paid post with Cred
More help:
https://toolset.com/documentation/user-guides/cred-api/

For the second question: “I'd like for example to let the post "visible" only during 3 month and cancel it then after.??
It is not possible within Toolset, I suggest you try create a daily wordpress schedule event, to update the status of outdated posts to "trash"
More help:
http://codex.wordpress.org/Post_Status
http://codex.wordpress.org/Function_Reference/wp_schedule_event

#154355

Pat

Hello luoy,
Thanks for your quick answer.
Concerning point 1, paid post is a product created with Woocommerce.
For point 2, I have already found a plugin Post Expirator that cover this topic, so it's OK for me.
Regards
Pat

#154442

Pat, is this problem resolved? do you need example codes for how to use CRED action hook "cred_save_data"?

#154572

Pat

Hi luoy,
Would be good to have these examples.
Thanks
Pat

#154795

Here is a example in the document:
https://toolset.com/documentation/user-guides/cred-api/
cred_save_data: (action)
Hook to do custom action when post data are saved to database.

And there is a lots of example in other thread:
hidden link

Le sujet ‘[Fermé] Define a limited publish time for a post created with Cred’ est fermé à de nouvelles réponses.