Try using media_handle_upload()
instead, solved a similar problem for me.
Related Posts:
- How to use media upload on metabox post page without breaking TinyMCE?
- What is the index [0] for on post meta fields?
- Custom field metabox not showing in back-end
- How to hide meta box values from custom fields list?
- Using media-upload.php to upload mp3 via custom fields
- Create meta boxes that don’t show in custom fields
- Custom fields to save multiple values
- Metabox with multiple fields added by user and upload box
- Metabox image upload and custom field
- Create Multiple File Upload Metabox in WordPress
- Button inside Custom Meta Box triggering the Update Button
- Why is my Custom Meta Box Field Inputs NOT saving?
- get_posts in meta box dropdown not showing latest posts
- How can you include custom post meta in search without calling each key?
- Display Custom Meta Box Field Only If Value is Present
- shortcode in a custom metabox
- Problem with saving large amount of data in postmeta/usermeta
- Move Title and the Content WYSIWYG editor position
- How to validate select field in post meta?
- Let’s Create Custom Field Template Documentation
- How add multiple wp_editor_box to new post
- Can I save post meta programatically without setting metaboxes?
- Meta box values are displayed on Custom Fields list. Is it possible to hide them?
- If metabox has content display content
- put saved metabox values back into fields and then display on the front end
- How to improve my non-unique metadata MySQL entries?
- Set class if a meta value is set within post archive
- WordPress Blocks, setAttributes not saving
- Allow HTML in Custom Metabox area
- Custom field metabox not showing in back-end
- Save, update, get and sanitize post meta as HTML not plain
- Create Meta boxes dynamically
- Get meta value when the page is a blog archive
- Can’t save meta field value if the title not set
- Display Data From This Custom Media Upload Meta Box?
- When post is updated, custom metadata in text area field is overwritten
- Custom Meta Boxes and Fields for WordPress: Change directory upload based on user-edit page
- wp_postmeta are updated for only one page
- When editing a post with a custom meta box the values aren’t displaying correctly
- How to add new Metadata options (Date, Author, etc.) for Posts?
- Saving multiple custom meta box fields
- Individual Widgets per Page
- How to add add_meta_box to specific Page Template?
- Can I count the number of users matching a value in a multiple value key?
- Auto sort the wp-admin post list by a meta key
- Adding another state (spam, reject, approve) to wordpress comments?
- extend Meta Box / Document Panel
- Add multiple images to a page sidebar
- Get updated meta data after save_post hook
- How to load php file for specific page in admin?
- How to set default metaboxes on user creation?
- Metabox nonce PHP notice
- TinyMCE in Custom Metabox not loaded after upgrading from WP 3.1.4 to WP 3.2
- How to break meta values into different items and avoid duplicates?
- ajax delete value from custom field array
- add meta box using function.php
- all tincymce’s switch when updating page after changing from html to text in custom metabox
- Custom image sizes for custom field media uploads
- Combine multiple custom field values into single value
- Odd PHP Code To Display HTML Of Meta Box [closed]
- Can’t get post ID using wp_insert_post_data
- Unique Post Meta Values
- Select multiple images from custom field
- Unique meta_key with array value vs repeated meta_key with single values
- When creating a metabox do you have to create DB fields for the data?
- Allow only one post with specific meta value
- Custom metabox not displaying multiselect data in edit mode
- How to display childrens custom fields?
- how to display custom fields of post on a web page
- How do I query the title (or handle?) of post meta fieldset (created with Simple Fields Plugin)
- How to fill custom fields with brackets in their key with add_post_meta()?
- Is it preferable to use custom code to create metaboxes instead of plugins (such as ACF) and if so why? [closed]
- How to store multiple custom meta box
- Front-End User Profile
- Displaying pages with a specific custom meta
- How can I output WPAlchemy repeating fields meta values in my page template?
- How to validation for sanitize_URL?
- Custom metabox not working
- How to get custom image field of specific post id
- Meta Box Plugin Cloned Fields – Multiple Foreach values
- How can I change author of posts to the value of one of the custom field of the posts?
- Custom Post Type meta data getting deleted on bulk editing taxonomies
- Add forms dynamically in admin pages?
- Saving Custom Field that includes Quotation marks
- Post meta data not showing in frontend, until hitting ‘update’ button
- searching by keywords in post’s metas or pagination links problem
- update meta field value after
- get wordpress post loop by meta box date
- Sub Field of File Field
- ACF plugin and field update
- If metabox fields has content display content
- Delete custom post type metadata without deleting the post in admin area
- Echo out custom fields in comments
- Save values generated via API as custom meta fields
- update_post_meta not working in action hook
- My meta boxes update wp_postmeta of posts but not of pages. What is wrong with the code?
- Display meta data from a custom field within plugin Category Grid View Gallery
- How do i output images from URL’s added to the same custom field key
- add multiple values (array) to post meta_input
- save all acf options in one meta_value [closed]