scribu/wp-posts-to-posts — Issue #61: Move 'connected_type' to P2P_Query
Author: scribu
Created: 2011-11-21 19:58:08+00:00
State: open
Labels: enhancement

`$posts_ids = p2p_type( 'posts_to_pages' )->get_connected( $post_id, array( 'fields' => 'ids' )->posts` is rather hard to read.

Much more familiar would be:

```php
$query = new WP_Query( array(
'connected_type' => 'posts_to_pages',
'connected_posts' => $post_id,
'fields' => 'ids'
) );

$post_ids = $query->posts;
```