Title: [Plugin: Posts 2 Posts] posts 2 users
Last modified: August 20, 2016

---

# [Plugin: Posts 2 Posts] posts 2 users

 *  Resolved [MoBlaise](https://wordpress.org/support/users/moblaise/)
 * (@moblaise)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-posts-2-users/)
 * does anyone know how to simultaneously list all posts connected to a certain 
   post as well as multiple authors connected to them?
 * tnx
 * [http://wordpress.org/extend/plugins/posts-to-posts/](http://wordpress.org/extend/plugins/posts-to-posts/)

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

 *  Plugin Author [scribu](https://wordpress.org/support/users/scribu/)
 * (@scribu)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-posts-2-users/#post-2520387)
 * Not sure what you mean by ‘simultaneously’.
 * It also depends if the relationship is:
 *     ```
       post_A - post_B - user
       ```
   
 * or
 *     ```
       post_A - post_B
       post_A - user
       ```
   
 *  Thread Starter [MoBlaise](https://wordpress.org/support/users/moblaise/)
 * (@moblaise)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-posts-2-users/#post-2520388)
 * I have 2 different post types, say posts A and posts B.
 * They are connected.
 * But posts B are also connected to users.
 * Now, for each post A I want to list all connected posts B, and users connected
   to each of those B posts.
 *  Plugin Author [scribu](https://wordpress.org/support/users/scribu/)
 * (@scribu)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-posts-2-users/#post-2520395)
 * Well, something like this should work:
 *     ```
       $connected_B = new WP_Query( array(
         'connection_type' => 'A-TO-B',
         'connected_items' => $post_A
       ) );
   
       p2p_type( 'B-TO-USER' )->each_connected( $connected_B );
       ```
   
 * The trouble is that `each_connected()` doesn’t work for posts-to-users connections
   yet.
 *  Thread Starter [MoBlaise](https://wordpress.org/support/users/moblaise/)
 * (@moblaise)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-posts-2-users/#post-2520404)
 * I’m not sure I understand… so this won’t work at the moment? If it will, could
   you let me know how the rest of the code should look like, how to finish the 
   loop, I’m a bit lost here…
 *  Plugin Author [scribu](https://wordpress.org/support/users/scribu/)
 * (@scribu)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-posts-2-users/#post-2520468)
 * It now works in the [development version](http://downloads.wordpress.org/plugin/posts-to-posts.zip)(
   1.1.5-alpha).
 * You’ll find a complete usage example for each_connected() in the wiki:
 * [https://github.com/scribu/wp-posts-to-posts/wiki/Looping-The-Loop](https://github.com/scribu/wp-posts-to-posts/wiki/Looping-The-Loop)

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

The topic ‘[Plugin: Posts 2 Posts] posts 2 users’ 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/)

 * 5 replies
 * 2 participants
 * Last reply from: [scribu](https://wordpress.org/support/users/scribu/)
 * Last activity: [14 years, 4 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-posts-2-users/#post-2520468)
 * Status: resolved