• i could upload the file from my form to the media using this code
    <?php
    require_once(ABSPATH . “wp-admin” . ‘/includes/image.php’);
    require_once(ABSPATH . “wp-admin” . ‘/includes/file.php’);
    require_once(ABSPATH . “wp-admin” . ‘/includes/media.php’);
    $attachment_id = media_handle_upload(‘upload_captcha_background’, $post->ID);
    ?>
    But i tried a lot to get data(attached file) on the back end,ie i want to display the file on my back end post type,
    what will be the best idea for my case?
    please suggest me and thanks in advance

  • The topic ‘how to get the file attachment in post type wordpress’ is closed to new replies.