Problem uploading different files as custom fields with front end post form
For starters, the ‘post_category’ argument only accepts category ID’s, so you will have to find that through your database, or through get_category_by_slug: $cat = get_category_by_slug( ‘music’ ); $cat_id = $cat->term_id; Secondly, look at your wp_handle_upload() section. You are passing $file[‘file’] in both cases, where ‘file’ is not the name of either of your upload fields. … Read more