Title: [Plugin: Posts 2 Posts] Using each_connected() multiple times bug?
Last modified: August 20, 2016

---

# [Plugin: Posts 2 Posts] Using each_connected() multiple times bug?

 *  [cmusial](https://wordpress.org/support/users/cmusial/)
 * (@cmusial)
 * [13 years, 12 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-using-each_connected-multiple-times-bug/)
 * Trying to use each connected multiple times like demonstrated on this page: [https://github.com/scribu/wp-posts-to-posts/wiki/Looping-The-Loop](https://github.com/scribu/wp-posts-to-posts/wiki/Looping-The-Loop)
   
   but not having any luck with it. The first each_connected() runs properly, but
   the second returns nothing. Thoughts?
 * My code here: [http://pastebin.com/UE0rPvFR](http://pastebin.com/UE0rPvFR)
 * [http://wordpress.org/extend/plugins/posts-to-posts/](http://wordpress.org/extend/plugins/posts-to-posts/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [scribu](https://wordpress.org/support/users/scribu/)
 * (@scribu)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-using-each_connected-multiple-times-bug/#post-2778957)
 * You mean no galleries are found or they’re just not displayed?
 * Right after the `each_connected()` calls, add this:
 *     ```
       echo '<pre>';
       print_r( $userProperties->posts );
       echo '</pre>';
       exit;
       ```
   

Viewing 1 replies (of 1 total)

The topic ‘[Plugin: Posts 2 Posts] Using each_connected() multiple times bug?’ 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/)

 * 1 reply
 * 2 participants
 * Last reply from: [scribu](https://wordpress.org/support/users/scribu/)
 * Last activity: [13 years, 11 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-using-each_connected-multiple-times-bug/#post-2778957)
 * Status: not resolved