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
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')
) );
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 🙁
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
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
Good luck!
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
(@ben_aliarteo)
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
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.