Home Forums Plugin Support WP User Frontend Pro File does not get attached to post

This topic is: not resolved

Tagged: 

This topic contains 4 replies, has 2 voices, and was last updated by  pingstumea 6 years, 1 month ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #2188

    pingstumea
    Participant
    Post count: 4

    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?

    #2189

    Tareq Hasan
    Keymaster
    Post count: 2831

    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?

    #2236

    pingstumea
    Participant
    Post count: 4

    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?

    #2238

    Tareq Hasan
    Keymaster
    Post count: 2831

    In the form Editor, when you click on the custom fields element
    custom fields
    They are inserted in the form editor area, then you need to provide the Label and meta key to work it correctly

    #2259

    pingstumea
    Participant
    Post count: 4

    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?

Viewing 5 posts - 1 through 5 (of 5 total)

The topic ‘File does not get attached to post’ is closed to new replies.