Title: Future Post and relation
Last modified: August 22, 2016

---

# Future Post and relation

 *  [Benito](https://wordpress.org/support/users/ben_aliarteo/)
 * (@ben_aliarteo)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/future-post-and-relation/)
 * Hi,
    Thank you for this great plugin ! very nice work ! I’m using a custom post
   type for my event (with the basic date) and When I do my relation between agencies
   and events, future events are ignored. Is there a way to do the relation ignoring
   the unpublish status of one of my custom post type event ? I think that it’s 
   just an option, but I can’t find where it is … tks for your help regards
 * [https://wordpress.org/plugins/posts-to-posts/](https://wordpress.org/plugins/posts-to-posts/)

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

 *  [Elías](https://wordpress.org/support/users/eliasgdj/)
 * (@eliasgdj)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/future-post-and-relation/#post-5416749)
 * I think this is a default behaviour of `WP_Query`. You have to add the `status`
   parameter to the query.
 * [http://codex.wordpress.org/Class_Reference/WP_Query#Status_Parameters](http://codex.wordpress.org/Class_Reference/WP_Query#Status_Parameters)
 * The code might look like this:
 *     ```
       $connected = new WP_Query( array(
         'connected_type' => 'posts_to_pages',
         'connected_items' => get_queried_object(),
         'nopaging' => true,
         'status' => array('publish','future')
       ) );
       ```
   
 *  [Elías](https://wordpress.org/support/users/eliasgdj/)
 * (@eliasgdj)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/future-post-and-relation/#post-5416750)
 * Wait I think your problem is when connecting, not when displaying. I think you
   have to use the `p2p_connectable_args` filter. I can’t give you more help 🙁
 *  [_fabio](https://wordpress.org/support/users/fibiuz/)
 * (@fibiuz)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/future-post-and-relation/#post-5416762)
 * Hi EliasNS,
 * I got the same issue.
    Your plugin do the sql query by post_status ‘publish’ 
   or ‘private’. I’d also like to make the query by post_status = ‘future’. How 
   can I achieve this?
 * Thanks
 *  [Elías](https://wordpress.org/support/users/eliasgdj/)
 * (@eliasgdj)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/future-post-and-relation/#post-5416763)
 * Hi Fibiuz.
 * I’m not the developer of the plugin, ¡I wish!
 * Since I am simply a apprentice on PHP and I only get things working with a lot
   of reading and testing. I only can refer you to my previous messages on this 
   thread, I can’t help anymore, I’m sorry 🙁
 * Well, I can leave here the URL for the [filters sections on the documentation](https://github.com/scribu/wp-posts-to-posts/wiki/Actions-and-filters)
 * Good luck!
 *  [_fabio](https://wordpress.org/support/users/fibiuz/)
 * (@fibiuz)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/future-post-and-relation/#post-5416764)
 * Hi EliasNS
 * Thank you anyway for your support.
    I was not able to fix the problem by using“
   p2p_connectable_args” I solved this issue by creating a custom query which allows
   to get any type of post connected.
 * Cheers 🙂
 *  Thread Starter [Benito](https://wordpress.org/support/users/ben_aliarteo/)
 * (@ben_aliarteo)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/future-post-and-relation/#post-5416765)
 * Hi, tks for your replies,
 * In my case, i decided to create a date metabox for my custom content, …
 * so I’m not using the future plugin anymore for that,
 * regards
 *  [Elías](https://wordpress.org/support/users/eliasgdj/)
 * (@eliasgdj)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/future-post-and-relation/#post-5416766)
 * Fibiuz, the type of post for a connection is defined when creating the connection.
 * Good solution Ben, one date for the post itself, and another for the date of 
   the event.

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

The topic ‘Future Post and relation’ 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/)

## Tags

 * [future post](https://wordpress.org/support/topic-tag/future-post/)

 * 7 replies
 * 3 participants
 * Last reply from: [Elías](https://wordpress.org/support/users/eliasgdj/)
 * Last activity: [11 years, 6 months ago](https://wordpress.org/support/topic/future-post-and-relation/#post-5416766)
 * Status: not resolved