• $args = array(
    			'meta_query' => array(
    					array(
    							'key' => 'event_date',
    							'value' => $today,
    							'compare' => '<='
    					)
    			),
    			'post_type' => 'post',
    			'meta_key' => 'event_date',
    			'orderby' => 'meta_value',
    			'order' => 'DESC'
    	);

    This works fine for ordering by 1 custom field, how can I add a second order by a custom field.

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘query_posts Order By 2 meta values’ is closed to new replies.