Title: [Plugin: Posts 2 Posts] &quot;Warning: Could not find direction(s)&quot; error
Last modified: August 20, 2016

---

# [Plugin: Posts 2 Posts] "Warning: Could not find direction(s)" error

 *  Resolved [jtwg](https://wordpress.org/support/users/jtwg/)
 * (@jtwg)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-warning-could-not-find-directions-error/)
 * I can’t seem to solve this issue.
 * Here’s the registration of the connection:
 * p2p_register_connection_type(array(
    ‘from’=>’case-study’, ‘to’=>’endorsement’,‘
   name’=>’case-study_to_endorsement’ ));
 * When I am in the edit screen for the case study post type, and connect the endorsement,
   that works and makes the following record in the p2p table:
    from: case study
   ID to: endorsement ID name: case-study_to_endorsement
 * And the query parameters used to attempt to retrieve the connected endorsement
   are:
    Array ( [post_type] => endorsement [orderby] => menu_order [numberposts]
   => 1 [order] => ASC [post_status] => publish [connected_type] => case-study_to_endorsement)
 * But the result is:
    Warning: Could not find direction(s). in /home/*****/wp-content/
   plugins/posts-to-posts/core/query-post.php on line 16
 * Any advice would be greatly appreciated, thanks.
 * [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)

 *  Thread Starter [jtwg](https://wordpress.org/support/users/jtwg/)
 * (@jtwg)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-warning-could-not-find-directions-error/#post-3094999)
 * Disregard due to PEBCAK.
 *  [Marco Panichi](https://wordpress.org/support/users/marcopanichi/)
 * (@marcopanichi)
 * [13 years ago](https://wordpress.org/support/topic/plugin-posts-2-posts-warning-could-not-find-directions-error/#post-3095305)
 * Add a connection_direction value to your WP_Query arguments
 *     ```
       $connected = new WP_Query( array(
         'connected_direction' => 'from',  // <<<--- IT IS NEEDED!
         'connected_type' => 'A_toB',
         'connected_items' => get_queried_object(),
         'nopaging' => true,
       ) );
       ```
   

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

The topic ‘[Plugin: Posts 2 Posts] "Warning: Could not find direction(s)" error’
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: [Marco Panichi](https://wordpress.org/support/users/marcopanichi/)
 * Last activity: [13 years ago](https://wordpress.org/support/topic/plugin-posts-2-posts-warning-could-not-find-directions-error/#post-3095305)
 * Status: resolved