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.

Can I change the order in which connections are displayed ?

If I create say three connections and then display them at the bottom of my article, I will get them in reverse order. How can I change that ?

I tried to use 'orderby' and 'order' but it has no effect whatsoever :

$connected_titles = new WP_Query( array(
'post_type' => 'as_title',
'nopaging' => true,
'orderby' => 'title',
'order' => 'DESC',
'suppress_filters' => false,
'connected_from' => get_queried_object_id()
));
share|improve this question
    
Explain connections ? –  MartinJJ Jun 25 '11 at 11:47
    
This plugin is all about connections between different types of posts. I've got article posts and quote posts. One article contains (is connected to) several quotes. I want to be able to display these connected quotes in any order. –  Mike Jun 25 '11 at 16:32
    
@Martin wordpress.org/extend/plugins/posts-to-posts –  TheDeadMedic Jun 25 '11 at 17:33
    
how are you displaying them? You should be able to use the regular query arguments for ordering, like orderby=post_title etc. Update your answer with your existing code if you can. –  TheDeadMedic Jun 25 '11 at 17:34
    
all right I included my code in my question –  Mike Jun 25 '11 at 18:01

1 Answer 1

up vote 2 down vote accepted

Just replace 'order' => 'DESC' with 'order' => 'ASC'.

share|improve this answer
    
I haven't thought about that I'm such a nut, anyway thanks scribu (and I spent like an hour creating an array to store the posts in the loop and at the end to display them in reverse order grmlgmrlmg!) –  Mike Jun 26 '11 at 19:23

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.