[Plugin: Posts 2 Posts] Add Image Upload to connection fields? (2 posts)

  1. Twansparant
    Posted 4 years ago #

    Hi scribu,

    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:

    global $participant_connection;
    $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 :)

    Thank you!

  2. scribu
    Posted 4 years ago #

    It's possible, but it's one of the most irksome things to implement in WordPress.

    Patches welcome.

Topic Closed

This topic has been closed to new replies.

About this Topic