Best practices for adding attachments to custom post types
-
Hi there,
I’m working on a simple document plugin for a client, using the new Custom Post Types in WordPress 3.
We’d like to have just the title and an upload field. So, I’m setting:
register_post_type('post_type_name', array('supports' => array('title'), ...)
to only have the title show up. Now, what’s the best way to add an upload field?
I started by adding a meta box using
add_meta_box
, and having a simpleinput type="file"
there. But the post form does not have theenctype
set. I found a bug report, but the developers mention that it is better to handle the uploads asynchronously. Are there any resources available that discuss this?Thanks!
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Best practices for adding attachments to custom post types’ is closed to new replies.