• Hi MetaBox Support,

    I’m trying to rebuild the functionality on my website that was created using the Posts 2 Posts plugin connecting a custom post type ‘Contributors’ to my posts.

    I’m already creating the ‘Contributors’ custom post type in my function.php file, & this is the code that I’d like to replace using your plugin:

    add_action('p2p_init', function(){
    	p2p_register_connection_type(array(
    		'name'        => 'contributor',
    		'cardinality' => 'many-to-many',
    		'from'        => 'contributor',
    		'sortable'    => 'any',
    		'to'          => array('post','page'),
    		'title'       => array(
    			'from' => 'Connected Posts and Pages',
    			'to'   => 'Connected Contributors'),
    		'admin_box' => array(
    			'show'    => 'any',
    			'context' => 'advanced')
    	));
    });

    I’ve read through the documentation but cannot figure out how to convert this function using your plugin. Many thanks.

    • This topic was modified 4 years, 8 months ago by megseoh.
  • The topic ‘Create Relationship Between Posts and Custom Post Type’ is closed to new replies.