Title: [Plugin: Posts 2 Posts] Posts to Users and each_connected
Last modified: August 20, 2016

---

# [Plugin: Posts 2 Posts] Posts to Users and each_connected

 *  [dragonet35](https://wordpress.org/support/users/dragonet35/)
 * (@dragonet35)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-posts-to-users-and-each_connected/)
 * As you suggested in my previous [question](http://wordpress.org/support/topic/plugin-posts-2-posts-displaying-connection-information-in-the-admin-dashboard?replies=4),
   I have been trying to make each_connected work for my dashboard widget.
 * For a posts-to-users connection, how would the example code (on the P2P documentation
   site) differ from the current example that shows using each_connected with a 
   regular posts-to-post type?
 * [http://wordpress.org/extend/plugins/posts-to-posts/](http://wordpress.org/extend/plugins/posts-to-posts/)

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

 *  Plugin Author [scribu](https://wordpress.org/support/users/scribu/)
 * (@scribu)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-posts-to-users-and-each_connected/#post-2919364)
 * It wouldn’t differ at all, except you can only get a list of posts, each with
   it’s connected users.
 * To get a list of users, each with it’s connected posts, you’ll have to use p2p_distribute_connected().
   Just look at how each_connected() is implemented.
 *  Thread Starter [dragonet35](https://wordpress.org/support/users/dragonet35/)
 * (@dragonet35)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-posts-to-users-and-each_connected/#post-2919513)
 * I don’t see p2p_distribute_connected() discussed or explained anywhere on the
   P2P wiki page. Would you please point me to it?
 * Thanks!
 *  [Steve Powell](https://wordpress.org/support/users/spowell/)
 * (@spowell)
 * [13 years ago](https://wordpress.org/support/topic/plugin-posts-2-posts-posts-to-users-and-each_connected/#post-2919582)
 * Here is the page on the wiki, but it does not provide a detailed explanation.
   
   [https://github.com/scribu/wp-posts-to-posts/wiki/p2p_distribute_connected](https://github.com/scribu/wp-posts-to-posts/wiki/p2p_distribute_connected)
 * HOWEVER, it does refer to the each_connected() documentation, which is more robust
   and probably what you want anyway. . .
    [https://github.com/scribu/wp-posts-to-posts/wiki/each_connected](https://github.com/scribu/wp-posts-to-posts/wiki/each_connected)

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

The topic ‘[Plugin: Posts 2 Posts] Posts to Users and each_connected’ 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/)

 * 3 replies
 * 3 participants
 * Last reply from: [Steve Powell](https://wordpress.org/support/users/spowell/)
 * Last activity: [13 years ago](https://wordpress.org/support/topic/plugin-posts-2-posts-posts-to-users-and-each_connected/#post-2919582)
 * Status: not resolved