-
WP-3.0 - Custom Post Types with Multi-Value fields?
Hello everyone,
I've been a lurker on here for a bit, and have enjoyed reading the threads.
For the last couple of weeks, I've been looking at the Custom Post Type features in WordPress 3.0. I'm trying to figure out how to create a custom post type with a multi-value field (e.g. allow a user to enter multiple email addresses (each with a type) into a "profile" Post Type).
Has anyone tried this? Is it possible?
Thanks,
Anca.
-
I'm not sure I get the question. Are you asking how to store the resulting data?
http://codex.wordpress.org/Function_.../add_post_meta
Usage:
add_post_meta($post->ID, 'email','whatever@example.com);
-
Hmm, okay, I think I get it. If my field is a complex type (e.g. an array or object) I can just serialize it using add_post_meta. I would write a callback to handle displaying, updating, and deleting different instances of the meta data.
Thanks,
Anca.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules