• Resolved chrisko90

    (@chrisko90)


    Hey there,

    I want to use an ACF Field (Date Picker) so that the user can select a date, when the post he creates through a form should be unpublished. I though using your Plugin “Post Expirator” could help me out with that, but this seems not to be implemented in ACF Pro Extended. Is there a way to add a compatibility to select a date when the post should be unpublished?

    I added the answer of the support in the link.

    Thank you for your feedback!

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Riza Maulana Ardiyanto

    (@rizaardiyanto)

    Hi @chrisko90

    If I’m not mistaken, you have opened a support ticket in our portal? If yes, we will continue the investigation there and will close this discussions.

    Thanks,

    Hello,

    ACF Extended developer here!

    Please allow me to intervene to give a little more context to the user’s request. Typically, the user is using ACF Extended to create posts from a front-end form, and he would like to programmatically configure the newly created posts to automatically expire on a specific date using your plugin.

    Users can add any custom PHP code when a post is created on the front-end. So I guess it would be possible to add post meta (or any other data) to the newly created posts, so PublishPress Future interact with it and understands when it has to delete them.

    Looking at your documentation about interactions with third party plugins, here is an example of possible usage:

    // this is executed everytime a post is created on the front-end
    add_action('acfe/form/submit_post/form=my-form', 'my_post_submit', 10, 4);
    function my_post_submit($post_id, $args, $form, $action){

    // PublishPress Future: enable expiration
    update_post_meta($post_id, '_expiration_status', '1');

    // PublishPress Future: add expiration date
    update_post_meta($post_id, '_expiration_date', '2024-10-24 00:00:00');

    // PublishPress Future: enable expiration delete
    update_post_meta($post_id, '_expiration_type', 'delete');

    // ...
    // ...

    }

    I’m not 100% sure about this code, it is just an example to illustrate what the user could do.

    I’ll let you describe how to configure the Post Type to the user, if there is any configuration to do there. But for the front-end part, he’s looking for the PHP code to use to automatically configure the newly created post.

    I hope this will give you more context.

    Thanks!

    Regards.

    Plugin Support Riza Maulana Ardiyanto

    (@rizaardiyanto)

    Hi @hwk-fr

    Thanks for jumping in.

    For the record, we already have direct integration with ACF in our Pro version.

    While we don’t yet offer direct integration with ACF Extended, it’s something we may consider in the future.

    If the user wants to use ACF Extended, the general guidance you mentioned would be the good documentation to read.

    However, please note that we can’t provide custom code for this, as it falls outside our support policy.

    Thanks,

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.