WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
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
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


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.