0
votes
1answer
15 views

Change path to child of page when uploading image via custom field

Is it possible to change the path of an image when it is uploaded via a custom field so that instead of appearing as www.mysite.com/wp-content/uploads/2014/05/file.pdf it will appear as ...
0
votes
2answers
470 views

unlink() doesn't delete the uploaded file

I'm using this code in my plugin to add an extra field to the user profiles so that the user can upload an image. It uploads the file perfectly but the only problem is the part that has to delete the ...
0
votes
2answers
64 views

How can I create more “create attachment” custom field - any idea?

define('MY_POST_TYPE', 'myslider'); define('MY_POST_SLUG', 'myslider'); function my_register_post_type () { $args = array ( 'label' => 'Gallery', 'supports' => array( ...
0
votes
2answers
618 views

Get image post ID in media upload

I am developing a plugin that adds a Custom Post Type to my theme. It's a retail directory and the post type is a retail listing. Everything is working fine. I can upload content to the DB and then ...
0
votes
2answers
228 views

Wordpress custom upload field error

I'm creating a custom upload field for a wordpress theme that uploads pdf files.The code is: function custom_news_meta_box($post) { $file_name = get_post_meta($post->ID, 'file_name', true); ...
0
votes
2answers
1k views

How to save media files under custom folder without changing wp-config.php or changing media settings

I want to upload images in a unique folder. Then retrieve the path of this image saved on server like http://example.com/wp-content/uploads/myimages/image1.jpg Now I want to save this URL in a post ...
0
votes
0answers
417 views

How to upload images as custom field with meta box?

With this sample of code I want to demonstrate that, my meta boxes are working well, entering data into database (postmeta) with the post, except the image files. They are passing the filenames only ...
0
votes
1answer
823 views

Upload image to wordpress

I'm a beginner writing website and use WordPress and I'm writing plugin that involves profile page (not avatar because this field that I implemented, user can upload image, anything, i.e. Picture of ...
0
votes
1answer
209 views

Wordpress Media Uploader custom Javascript not working

I encountered a strange problem with my JavaScript (jQuery) when trying to modify the behavior of my Media Uploader in Wordpress 3.5 This was my JQuery: $('.attachment-filters').change(function(){ ...
2
votes
1answer
884 views

Saving Custom Field in Attachment Window in WordPress 3.5

I'm using the code below to add a custom text field in WP 3.5 Attachment Window (from this question # Expanding new Media Uploader in WordPress 3.5) ... add_filter( 'attachment_fields_to_edit', ...
0
votes
1answer
492 views

Image upload and path to custom field

I build a script, to post from frontend. There are many custom-fields. Most works fine, but with one thing i have problems. First a description, then the script. It seems like, that images won't ...
0
votes
1answer
615 views

How to delete file uploaded by Plupload

I follow the steps from here to integrate the plupload in metabox. Everything is working fine. But I do found one disadvantages of this guide. When I click 'Remove' link from the uploaded images, it ...
1
vote
0answers
565 views

Uploading PDF using Media Uploader

I have been using a custom code to upload images to Wordpress using custom metaboxes. Here is the code: <script type="text/javascript"> jQuery(document).ready(function( $ ) { var ...
1
vote
1answer
286 views

Metabox with multiple fields added by user and upload box

I'm trying to build system, where user can add as many fields as he needs to the post. I'm using code from this thread. Everythings works fine, except I can't get my upload working. Here's code I've ...
0
votes
1answer
483 views

Problem uploading different files as custom fields with front end post form

I have a front end post form that I'm having some problems getting the right path for the media to save as custom fields. The path to the file gets saved as ...
0
votes
1answer
64 views

Allow authors to create article image

I want to allow contributors to upload images while creating posts. But the catch is, I am building the post display pages out of my own custom PHP. Every article written will follow the same ...
0
votes
2answers
796 views

How to use media upload on metabox post page without breaking TinyMCE?

I'm using the following code for upload in multiple mextaboxes in a post or page admin section. Works for metaboxes but breaks the TinyMCE insert image. I want to know please how I can achieve this ...
0
votes
1answer
397 views

How do i save and retrieve custom attachment meta?

I'm trying to save if a checkbox inside of the media uploader pop up is checked, so i can retrieve it from the front end. I'm using this code: function filter_attachment_fields_to_edit( ...
2
votes
2answers
370 views

Custom image sizes for custom field media uploads

Is it possible to resize my image uploads to different settings, depending on what custom field I'm on? I'm using wpalchemy, and have an image uploader for a heap of different custom fields. It would ...
2
votes
1answer
1k views

Metabox image upload and custom field

Is it possible to a) upload image in meta box (not using default WP image uploader) and then b) get the path to uploaded this way image in a custom field?
1
vote
2answers
990 views

Insert attachment ID in custom field from media uploader

This is what I want to do: In the media uploader, add a link "Use this attachment ID as custom field". Add the attachment ID in a custom fields meta box. I've searched for hours for a plugin that ...
2
votes
1answer
869 views

wp_handle_upload error “Specified file failed upload test” but still creates attachment?

Having a bit of trouble with an image upload custom meta box. What happens is the uploaded image is created as an attachment but the wp_handle_upload seems to kick back the error "Specified file ...
4
votes
2answers
1k views

Using media-upload.php to upload mp3 via custom fields

I'm trying to use the Thickbox file upload dialogue with a custom field to allow the user to upload an mp3. What I want to do is to grab the URL of the uploaded mp3 and save it as postmeta (saving the ...
0
votes
3answers
667 views

Multiple image uploader under editor?

I need a plugin for custom post type. I need something like this: Can anyone suggest a plugin which has this feature, especially image upload and "Add another" button option.
1
vote
1answer
2k views

Create custom fields as image uploads [duplicate]

How can I define a custom field that works as an image upload? Should be fairly basic but I can't seem to find the solution. Let's say you create the post type 'book' and want to create 3 fields: ...
33
votes
3answers
43k views

How can I add an image upload field directly to a custom write panel?

I've added a new page under "Pages" in the wordpress admin, and added several custom fields. I'd also like to be able to add an upload image field to the page editor - is there some way to do this via ...