unable to set uploaded file via frontend form as featured image
first of all you need to add enctype=”multipart/form-data” to make your form support file uploads. So far you’ve attached the image to the post, but you haven’t inserted them. Try something like this <?php $args = array( ‘post_type’ => ‘attachment’, ‘numberposts’ => -1, ‘post_status’ => null, ‘post_parent’ => $post->ID ); $attachments = get_posts($args); if ($attachments) … Read more