Title: [Plugin: Posts 2 Posts] Multiply Connections
Last modified: August 20, 2016

---

# [Plugin: Posts 2 Posts] Multiply Connections

 *  Resolved [Zhen](https://wordpress.org/support/users/milohuang/)
 * (@milohuang)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-multiply-connections/)
 * Hello all,
 * I want to have a custom post type “series” be displayed both in Post and Page.
   Here is my original code.
 *     ```
       function my_connection_types() {
           if ( !function_exists( 'p2p_register_connection_type' ) )
               return;
   
           global $my_connection_type;
   
           $my_connection_type = p2p_register_connection_type( array(
               'from' => 'post',
               'to' => 'series'
           ) );
       }
       add_action( 'init', 'my_connection_types', 100 );
       ```
   
 * The code provided on the Wiki (above one) can only create one connection “series
   and post”, how can I make it work with Page too? I tried the below and it does
   work for pages. The connection was established but I cannot use the code on the
   Wiki to display the “series” on post this time (while page works fine). Any help
   is greatly appreciated!
 *     ```
       function my_connection_types() {
           // Make sure the Posts 2 Posts plugin is active.
           if ( !function_exists( 'p2p_register_connection_type' ) )
               return;
   
           // Keep a reference to the connection type; we'll need it later
           global $my_connection_type;
   
           $my_connection_type = p2p_register_connection_type( array(
               'from' => 'post',
               'to' => 'series'
           ) );
           $my_connection_type = p2p_register_connection_type( array(
               'from' => 'page',
               'to' => 'series'
           ) );
       }
       add_action( 'init', 'my_connection_types', 100 );
       ```
   
 * [http://wordpress.org/extend/plugins/posts-to-posts/](http://wordpress.org/extend/plugins/posts-to-posts/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [scribu](https://wordpress.org/support/users/scribu/)
 * (@scribu)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-multiply-connections/#post-2316714)
 * Using version 0.9.1, you can do this:
 *     ```
       $my_connection_type = p2p_register_connection_type( array(
         'from' => array( 'post', 'page' ),
         'to' => 'series'
       ) );
       ```
   
 *  Thread Starter [Zhen](https://wordpress.org/support/users/milohuang/)
 * (@milohuang)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-multiply-connections/#post-2316739)
 * Just updated to 0.9.1 and it works like a charm!! Thank you scribu for this great
   plugin!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘[Plugin: Posts 2 Posts] Multiply Connections’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/posts-to-posts_7a8e9d.svg)
 * [Posts 2 Posts](https://wordpress.org/plugins/posts-to-posts/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/posts-to-posts/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/posts-to-posts/)
 * [Active Topics](https://wordpress.org/support/plugin/posts-to-posts/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/posts-to-posts/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/posts-to-posts/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Zhen](https://wordpress.org/support/users/milohuang/)
 * Last activity: [14 years, 8 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-multiply-connections/#post-2316739)
 * Status: resolved