• Resolved bartoszy

    (@bartoszy)


    I want to add custom post via front form and I have no idea how to save post thumbnail for it. There are fields like “Post Status”, “Post Title”, but where is “Post Thumbnail”?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Konrad Chmielewski

    (@hwk-fr)

    Hello,

    Thanks for the feedback!

    Unfortunately that feature isn’t available at the moment, and will be released in the upcoming update.

    In the meantime, you can use the Post Action submit hook acfe/form/submit/post (See documentation) in combination with set_post_thumbnail() (See documentation) in order to programmatically set the new post featured image. Usage example:

    add_action('acfe/form/submit/post/form=my-form', 'my_form_submit', 10, 5);
    function my_form_submit($post_id, $type, $args, $form, $action){
        
        // retrieve my_image value
        $my_image = get_field('my_image');
        
        // set my_image ID as featured thumbnail for the newly created post
        set_post_thumbnail($post_id, $my_image['ID']);
        
    }
    

    Hope it helps!

    Have a nice day!

    Regards.

    Hi,
    Will that feature be released soon ? It would be very useful for us !!
    Thanks

    • This reply was modified 2 years, 2 months ago by ericrondo.

    Has this been resolved? I’m using a create post form, and trying to upload the Featured Image, but the link in the form is a # and nothing happens when I click the upload

    • This reply was modified 2 years, 1 month ago by pzh20.
    Plugin Author Konrad Chmielewski

    (@hwk-fr)

    Hello,

    Thanks for the feedback!

    The Image Field “Set as Featured Thumbnail” setting correctly set the uploaded image as Featured Thumbnail when the field is checked in the “Save as meta” inside the ACFE Form “Post Action.

    Regarding the setting to define a field as “Featured Thumbnail” directly from the ACFE Form “Post Action” UI, this will come in a future update.

    Regarding your issue @pzh20, please check the support thread you created.

    Have a nice day!

    Regards.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to set post featured image from front form.’ is closed to new replies.