Tag Info

Hot answers tagged


change your args as bellow $args = array( 'post_type' => 'your_post_type', 'orderby' => 'meta_value', 'meta_query' => array(array('key' => 'releaseDate')), 'order' => 'ASC', 'paged' =>$paged, ); If you get the results ordered other way around, change 'order' => 'DESC', You'll get the correct order.


You don't get any ordering, because you are making multiple get_posts() calls and only retrieve a single post in each of them. You cannot order a single post. :) You need to get rid of outermost loop and just pass a set of IDs (that would be your $instance['data']) to retrieve via single get_posts() call.

Only top voted, non community-wiki answers of a minimum length are eligible