It's possible to define a custom sort order for each connection.
When registering a connection type, you can set the 'sortable' flag:
p2p_register_connection_type( array( 'name' => 'posts_to_pages', 'from' => 'post', 'to' => 'page', 'sortable' => 'any' ) );
The value of 'sortable' can be 'from', 'to', 'any', or false (default).
'from'
'to'
'any'
false
This will make the connection rows sortable via drag-and-drop. The ordering information will be stored in a connection field.
When calling p2p_type( 'posts_to_pages' )->get_connected(), the resulting list will be ordered accordingly.
p2p_type( 'posts_to_pages' )->get_connected()
Note that ordering is not available for indeterminate connection types.
There was an error while loading. Please reload this page.