Support » Plugins and Hacks » [Plugin: Posts 2 Posts] Add Image Upload to connection fields?
5 years, 1 month ago
I’m wundering if it’s possible to add an image select dropdown or even better, an image upload function to the additional connection fields?
My goal is to connect multiple posts from post type A to post type B, but to be able to select the post image (or featured image) per connection.
I tried populating the dropdown field with all the attached images from post-1, but that didn’t work:
$images =& get_children('post_type=attachment&post_mime_type=image');
$participant_connection = p2p_register_connection_type( array(
'from' => 'event',
'to' => 'participant',
'fields' => array(
'image' => array(
'title' => 'Image',
'values' => $images
Any ideas on this? Or are you perhaps planning to add this function in a nearby update? Any help is appreciated 🙂
It’s possible, but it’s one of the most irksome things to implement in WordPress.