[wp-hackers] query_posts orderby not working properly
Brian Fidler
fidler.brian at gmail.com
Sat Aug 14 06:58:59 UTC 2010
it gives me DESC order regardless of whether I choose ASC or DESC. I
actually need ASC order.
On Fri, Aug 13, 2010 at 9:22 PM, Jake Goldman <
wphackers at jakemgold.myfastmail.com> wrote:
> Valid options for orderby and order:
>
>
> http://codex.wordpress.org/Function_Reference/query_posts#Orderby_Parameters
>
> Your first example certainly shouldn't work. You can't order by a specific
> post's title. I'm not sure why the second example isn't working for you, but
> I can attest to the fact that it /does/ work.
>
> What order does it give you?
>
> Jake
>
>
> On 8/13/2010 11:57 PM, Brian Fidler wrote:
>
>> I'm having a problem getting a query to order properly. This is what I
>> currently have:
>> query_posts('cat='.$category->cat_ID.'&posts_per_page=-1&orderby='.
>> $post->post_title . '&order=DESC');
>>
>> I've also tried:
>>
>> query_posts('cat='.$category->cat_ID.'&posts_per_page=-1&orderby=title&order=DESC');
>>
>> Any idea what I could be missing?
>>
>> thanks
>> brian
>> _______________________________________________
>> wp-hackers mailing list
>> wp-hackers at lists.automattic.com
>> http://lists.automattic.com/mailman/listinfo/wp-hackers
>>
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
More information about the wp-hackers
mailing list