scribu/wp-posts-to-posts — Issue #113: Only 10 connections are shown
Author: xaendi
Created: 2012-02-14 16:43:18+00:00
State: open

First, many thanks for developing this great plugin.

I am about to develop my own plugin which uses your P2P plugin as a basis. Whenever I create connections between 'Tours' and 'Waypoints', only the first 10 connections are shown, even if there are more connections.

First, I use this:

function my_connection_types() {
// Make sure the Posts 2 Posts plugin is active.
if ( !function_exists( 'p2p_register_connection_type' ) )
return;

p2p_register_connection_type( array(
'name' => 'tour_2_waypoint',
'from' => 'tour',
'to' => 'waypoint',
'reciprocal' => true,
'sortable' => 'order'
) );
}

add_action( 'wp_loaded', 'my_connection_types' );

To list the connections, I use the following:

// Find connected pages
$connected = p2p_type('tour_2_waypoint')->get_connected( $tour_id );

// Display connected pages
while ( $connected->have_posts() ) : $connected->the_post();
echo get_the_title();
endwhile;

Any idea, why that does not work properly? Is there a limitation of possible connections?

Thanks in advance.