scribu/wp-posts-to-posts — Issue #104: Getting connections within archive?
Author: benjaminallison
Created: 2012-01-24 14:13:45+00:00
State: open

So, p2p is working great on single pages, and while I've seen the tutorial on archive pages, i'm not sure it will work because I'm making use of pagination, etc.

So within the loop, I'm using:

```
$connected = new WP_Query( array(
'connected_type' => 'burgers_to_joints',
'connected_items' => get_queried_object_id(),
));

if ( $connected->have_posts() ) :
while ( $connected->have_posts() ) : $connected->the_post();
*** stuff***
endwhile;
wp_reset_postdata();
endif;
```

But it returns this error:

Warning: Can't determine direction in /home/roestud/public_html...posts-to-posts/core/query-post.php on line 60

What am I doing wrong? Thanks!