function roots_connection_types() {
// Make sure the Posts 2 Posts plugin is active.
if ( !function_exists( 'p2p_register_connection_type' ) )
return;
p2p_register_connection_type(array(
'name' => 'article_to_company',
'from' => 'article',
'to' => 'company'
));
}
add_action( 'wp_loaded', 'roots_connection_types' );