Hi, I am working with a event listing system. There is a custom field in my post called starting_time which is unix timestamp. Now i want to short all posts by starting_time by this query_post command. I also dont want to show the already started events so i used a meta comparison :
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1; query_posts(array( 'post_type' => 'event', 'meta_key' => 'start_time', 'meta_compare' =>'>=', 'meta_value'=>time(), 'order_by' => 'meta_value_num', 'order' => 'ASC', 'paged' => $paged ));
But it not working. Here is the site http://citystir.com/events/. I am echoing the start_time in unix before the time remaining so you can see the value.
reference: Order by parameter
Another great post i have found here by sql but can't get it working. Waiting for your reply soon.