Support

Account

Home Forums General Issues Auto draft a post from CPT according to a date field

Unread

Auto draft a post from CPT according to a date field

  • Hello everyone,

    I would ask a small question on your forum.

    I would like to make a system that would automatically put a post of a custom post type in draft on a certain date. Indeed, I have a field ACF “expiration date” and, when the date in question arrives, I would like the post to be automatically put in draft.

    I’m not a back-end professional, but I know how I’m going to build my job. I can achieve this effect with the function wp_transition_post_status() but having never created a function WordPress itself, I don’t know how to do it and especially how to make this function communicate with a specific custom post type.

    Would you have any leads to tell me to do this?

    Thanking you in advance.
    Willwoody.

Viewing 1 post (of 1 total)

The topic ‘Auto draft a post from CPT according to a date field’ is closed to new replies.