Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

My question resembles one I asked before:

[Plugin: Posts 2 Posts] Changing display order of connections

But now I want to display the connection in the SAME order I created them ! That is, if I attache quote#1 THEN quote#2 to an article, I want quote#1 to appear before quote#2 regardless of the creation date of these quotes, their alphabetical order or whatever. Don't know if I make myself clear o_O

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

With the development version of the plugin (0.8-alpha), you have a 'p2p_orderby' query var, which you can use with WP_Query, like so:

$my_query = new WP_Query( array(
  'connected_to' => get_queried_object_id(),
  'p2p_orderby' => 'my_connection_field'
) );

More info on connection fields:

https://github.com/scribu/wp-posts-to-posts/wiki/Connection-information

Note that this is alpha software and you still have some work to do on your own.

share|improve this answer
    
PS: If you want to make sure that I see the question, either tag it with plugin-posts-to-posts, or use the wp.org support forums. –  scribu Jul 16 '11 at 17:57
    
Awesome! Thanks scribu –  Mike Jul 16 '11 at 22:47
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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