I must be a bit slow, I still have problems with the position field in the Posts-2-Posts plugin. If I set a position to each connection in a given post (say 1, 2 and 3) I don't understand how to display these connections in this order. I thought this would do the job :

$xxx = new WP_Query( array(
'post_type' => 'author',    
'p2p_orderby' => 'position',
'connected_order' => 'desc',
'connected_from' => get_the_ID()
) );    

It doesn't. The position field is just not taken into account at all, even if I remove the line « 'p2p_orderby' => 'position' ». What do I do wrong ?

  • My code was flawed, please ignore this thread. – Mike Sep 11 '11 at 15:03

Yes, it was actually 'connected_orderby' instead of 'p2p_orderby'.

Also, this can be done via drag-and-drop since version 0.9:


| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.