How to Sorting / Order by multiple custom fields.
-
How to display posts with ‘Event’ custom type ordered by ‘Start_Hour’ and then by ‘Start_Minute’?
‘Start_Hour’ and ‘Start_Minute’ are numeric custom fields.
I tried this, but it doesn’t work:
$args = array( 'post_type'=>'Events', 'orderby' => 'meta_value', 'meta_key' => 'Start_Hour Start_Minute', 'order' => 'ASC' ); $loop = new WP_Query( $args );
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘How to Sorting / Order by multiple custom fields.’ is closed to new replies.