April 14, 2013 at 6:25 pm 2188
|pingstumea||Hi, I have a custom post type for which I've built a form containing the custom field "File Upload" which you provide by default. My problem is that when I publish a post and use the file uploader the file does not get attached to the post. It uploads all right and I can se it in my media library but it says that it's unattached. Why? Is there a setting I have missed?|
April 14, 2013 at 6:56 pm 2189
Did you provided the meta key for the “File Upload” custom field? Do you see the custom field in the WordPress admin area post edit screen?
April 15, 2013 at 6:03 pm 2236
I can see the metabox “WPUF Custom Fields” in the post edit screen but there is nothing in it. Where do I provide the meta key?
April 15, 2013 at 6:31 pm 2238
In the form Editor, when you click on the custom fields element
April 15, 2013 at 8:12 pm 2259
Ok I got it working now, thanks. My problem was that I was not able to figure out how to create a permanent custom field for a custom post type in my functions.php, so I resorted to using a plugin (Advanced Custom Fields). When I entered the meta key for the custom field I created with ACF the file I uploaded got attached.
I would like to solve this without being dependant on a plugin in the future. Do you know of good resource on how to create a custom field(file upload) for a custom post type without the use of a plugin?