Support » Plugins and Hacks » [Resolved] uploaded image to post
3 years, 9 months ago
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.
Or should i just use an sql-statement for this?
i just use an sql stat for this.