Warning: Could not find direction(s) (…) Line 16
-
Hi,
I installed the development version and still have the same problem described has solved in here:
http://wordpress.org/support/topic/plugin-posts-2-posts-still-missing-data-after-141?replies=31So i post it here again, if someone can help me.
Here is my code:
The function:
function my_connection_types() { p2p_register_connection_type( array( 'name' => 'pages_to_pages', 'from' => 'page', 'to' => 'page', 'reciprocal' => true, 'sortable' => 'any' ) ); } add_action( 'p2p_init', 'my_connection_types' );
Printing connected pages:
$connected = new WP_Query( array( 'connected_type' => 'pages_to_pages', 'connected_items' => get_queried_object(), 'nopaging' => true, ) ); // Display connected pages if ( $connected->have_posts() ) : ?> <h3>Related pages:</h3> <ul> <?php while ( $connected->have_posts() ) : $connected->the_post(); ?> <li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li> <?php endwhile; ?> </ul> <?php // Prevent weirdness wp_reset_postdata(); endif;
And i still get the error:
Warning: Could not find direction(s). in /public_html/wp-content/plugins/posts-to-posts/core/query-post.php on line 16
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Warning: Could not find direction(s) (…) Line 16’ is closed to new replies.