Hello all, First of all - I posted this here because it's a PHP related question and one that goes common blogging questions... I have two custom fields X and Y for each of the posts in question. I would like to get the loop to output the posts sorted first by the value on X and then by the value of Y. A more specific example in action: Custom field X has values a, b, and c. Custom field Y has values 3, 2 and 1. I want the posts to be displayed in the following order: a3,a2,a1,b3,b2,b1,c3,c2,c1. I read through http://codex.wordpress.org/Class_Reference/WP_Query and it does have a section that talks about "Multiple orderby values" but that won't work as far as I can understand since there can only be one meta_value in each array... Any ideas? Thanks in advance!
Check out this page, it looks like what you are looking for. http://codex.wordpress.org/Function_Reference/query_posts $args = array( 'cat' => 22, 'year' => $current_year, 'monthnum' => $current_month, 'order' => 'ASC' ); query_posts( $args ); PHP: