Tell me more ×
WordPress Answers is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have a query, ordered correctly by the meta_key in ascending order, but they are devided into groups of their category. This example shows the postorder in the WP category editor:

Cat 6
- sub 1
- - post 49
- - post 9
- sub 2
- - post 11
- - post 51
- sub 3
- - post 30
- - post 1

My ordered list looks like this at the moment :(

Cat 6
- - post 9
- - post 49
- - post 11
- - post 51
- - post 1
- - post 30

It sorts the posts in each category correctly but it divides the list into groups of the categorys

What I want is this: :)

Cat 6
- - post 1
- - post 9
- - post 11
- - post 30
- - post 49
- - post 51

All posts from all categories should be in the the same order, no matter in which subcategory the are.

That is my code in the query:

 $wp_query->query('ignore_sticky_posts=1&posts_per_page=-1&orderby=meta_value_num&meta_key=date_start&orderby=ASC' );

What else can I do to fix it?

Your help is much appreciated. Thank you!

share|improve this question

closed as too localized by toscho Apr 3 at 10:15

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, see the FAQ.

1 Answer

orderby=ASC should be order=ASC

share|improve this answer
I found out where the problem was. My dateformat is this: 2012-08-15 That doesn't work with "orderby=meta_value_num", but perfectly with "meta_value". Now everything is correct :) – anfaenger Aug 15 '12 at 8:18

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