• Resolved SSchat

    (@sschat)


    Hi,

    i have a front-end form, to create new post, and in where files can be ‘attached’.
    Once a file is ‘selected’ it will be uploaded directly. And the attachment_id is saved in the form.

    Once the whole form is submitted, the post is created, and i have the post_id.

    but can i link the attachment to the post?

    i cant seem to find any function for this.
    “wp_insert_attachment” does the only job. But i have already uploaded the file. so i can not use this function.

    // brain-fart….
    Or should i just use an sql-statement for this?

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘uploaded image to post’ is closed to new replies.