Title: [Plugin: Posts 2 Posts] Posts connected to Future Posts
Last modified: August 20, 2016

---

# [Plugin: Posts 2 Posts] Posts connected to Future Posts

 *  Resolved [djrowan](https://wordpress.org/support/users/djrowan/)
 * (@djrowan)
 * [14 years, 3 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-posts-connected-to-future-posts/)
 * I have an events engine that has future events. How can I tell p2p to return 
   posts in the future only?
    I tried this: $connected = new WP_Query( array( ‘connected_type’
   => ‘event_artists’, ‘connected_items’ => get_queried_object_id(), ‘post_status’
   => ‘future’ ) );
 * I have it working on this for a while and just figured out why it wasn’t returning
   any results! Future posts!
    Please help me out here! Thanks Rowan
 * [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, 3 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-posts-connected-to-future-posts/#post-2576342)
 * First try getting all future events:
 *     ```
       $connected = new WP_Query( array(
       'post_type' => 'event',
       'post_status' => 'future',
       ) );
       ```
   
 * If that works, then add the ‘connected_’ parameters.
 *  Thread Starter [djrowan](https://wordpress.org/support/users/djrowan/)
 * (@djrowan)
 * [14 years, 3 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-posts-connected-to-future-posts/#post-2576419)
 * Hey Scribu,
    Thanks for the reply.
 * This works to get future entries:
    $connected = new WP_Query( array( ‘post_status’
   => ‘future’, ) );
 * This fails to return any results:
    $connected = new WP_Query( array( ‘post_status’
   => ‘future’, ‘connected_type’ => ‘event_artists’, ‘connected_items’ => get_queried_object_id()));
 * WHOOHOO .. i just cracked it. I was missing the ‘connected_direction’ parameter.
 * Here’s my successful query for future events:
    $connected = new WP_Query( array(‘
   post_status’ => ‘future’, ‘connected_type’ => ‘event_artists’, ‘connected_items’
   => get_queried_object_id(), ‘connected_direction’ => ‘any’ ) );
 * Thank you for helping me work through that one. That took a LONG time to figure
   out, but I’m stoked to have it now.
 * cheers
    rowan

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

The topic ‘[Plugin: Posts 2 Posts] Posts connected to Future Posts’ 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: [djrowan](https://wordpress.org/support/users/djrowan/)
 * Last activity: [14 years, 3 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-posts-connected-to-future-posts/#post-2576419)
 * Status: resolved