This one has been bugging me for a while. I've used Verve Meta Boxes plugin to add a date field to a custom post type I created, and I would like to somehow order by this field when using query_posts in PHP. What's the best way to do this? I haven't been able to figure out a way that didn't involve complicated custom queries.
Tell me more
×
WordPress Answers is a question and answer site for
WordPress developers and administrators. It's 100% free, no registration required.
|
|
||||
|
I found the following solution:
As other |
|||||
|
|
It would help to see all of your code, without more context it's just shots in the dark. I use this to accomplish what you're trying to do, using date format
|
|||||
|
'meta_key' => 'datum', 'orderby' => 'meta_value_num', 'order' => 'ASC'since I assumed the compare things were meant for only displaying events that had not yet past. This still does not work, for some reason. It's very frustrating. – CookieMonster Sep 6 '11 at 19:18datumvalue is it the unix time? – Sisir Sep 7 '11 at 7:44