I need help with this. I miss something and I don´t know what is it.
This is my connection:
p2p_register_connection_type( array( 'name' => 'salas_conciertos', 'from' => 'sala', 'to' => 'concerts' ) );
On the “concerts” archive page, I´m trying to get the connected “sala” for each concert. I´m using this code:
// Find connected pages $connected = new WP_Query( array( 'connected_type' => 'salas_conciertos', 'connected_items' => $post, 'nopaging' => true, ) ); // Display connected pages while ( $connected->have_posts() ) : $connected->the_post(); the_title(); endwhile; wp_reset_postdata(); // set $post back to original post
I get this error:
Warning: Could not find direction(s). in /usr/…/wp-content/plugins/posts-to-posts/core/query-post.php on line 16
What am I doing wrong??
- The topic ‘[Plugin: Posts 2 Posts] Get conections in an archive page’ is closed to new replies.