WordPress.org

Ready to get started?Download WordPress

Forums

Problems accessing Media Uploader sans Editor in Custom Post Types (6 posts)

  1. dehuszar
    Member
    Posted 4 years ago #

    I'm just getting going with WP3's custom post types, and in the process of setting up custom meta boxes for the custom fields in use on an existing site.

    In the existing system, the client has to upload the image using the uploader, and then grab the URL for that image, and then paste that url into a custom field with the appropriate key. Tedious, and not ideal, but it works.

    I was hoping to use a media uploader tool of some kind, but the default media uploader which allows me to attach media to the post is attached to the Editor, which I don't want to include on these custom post types.

    Moreover, after a LOT of searching, I can't find a single snippet of documentation of using the media uploader outside of the default post-type. My guess is that it's the uploader mechanism from TinyMCE, but even so, is anyone aware of a usable tutorial or set of docs which describe how to access / use the media uploading system via WP functions?

    Thanks in advance,
    Sam

  2. dehuszar
    Member
    Posted 4 years ago #

    A quick follow-up to my question about documentation and tutorials...

    I would ideally like to apply type => file to a custom field input, and have the $_SERVER['PHP_SELF'] of the uploaded file to post into a pre-determined custom field, or to just be able to use the uploader to attach media files to the post, and then use a select list to choose the image from a list of attachments.

    Is there a way to separate the editor from the media uploader, or manually call functions from the uploader so that I could have an "attach media" meta_box where the client uploads videos and images to the post, and then a more specific meta_box where the client can then select the attached images in a way that tethers the URL for said media upload to the intended custom field?

  3. dehuszar
    Member
    Posted 4 years ago #

    A quick follow-up to my question about documentation and tutorials...

    I would ideally like to apply type => file to a custom field input, and have the $_SERVER['PHP_SELF'] of the uploaded file to post into a pre-determined custom field, or to just be able to use the uploader to attach media files to the post, and then use a select list to choose the image from a list of attachments.

    Is there a way to separate the editor from the media uploader, or manually call functions from the uploader so that I could have an "attach media" meta_box where the client uploads videos and images to the post, and then a more specific meta_box where the client can then select the attached images in a way that tethers the URL for said media upload to the intended custom field?

  4. dehuszar
    Member
    Posted 4 years ago #

    Okay. No takers.

    Another related question then...

    I've been looking through the get_attachment functions. I've seen how I could call a file attached to a post if I knew the attachment ID, but is there a way to query a list of objects attached to the current post?

    What I'd like to do is use custom fields, and custom meta-boxes to create a drop-down select list of attachments so if I can't programmatically upload the URI of an attachment directly into a custom field, I can at least have the client upload a batch of them and then select the attachments from a list in the relevant custom fields.

    Any ideas?

    Thanks in advance.

  5. dehuszar
    Member
    Posted 4 years ago #

    Please?

  6. Developer ICAN
    Member
    Posted 3 years ago #

    God - i'd love to help you! i've run into the same problem!

  7. waterdaymedia
    Member
    Posted 3 years ago #

    How to Create a Custom Post Type with Image Uploads For WordPress 3:

    http://sicdigital.com/2010/07/create-custom-post-type-for-image-upload-wordpress3/

    There are lots of tutorials out there...

Topic Closed

This topic has been closed to new replies.

About this Topic