WordPress upload post and attach file (wp_insert_post and wp_insert_attachment)

WordPress upload post and attach file (wp_insert_post and wp_insert_attachment) Dear readers, My current Custom WordPress theme doesn’t allow me to attach an image / .pdf by to a post. This form (method=”POST”) has a ‘subject’ and ‘textarea’ field and ofcourse an input type=”file”. What does work is create a post by using: ‘wp_insert_post’ and get … Read more