For numeric data, the orderby
key should have value as meta_value_num
. Use WP_Query and change
'orderby' => 'meta_value'
to
'orderby' => 'meta_value_num'
For numeric data, the orderby
key should have value as meta_value_num
. Use WP_Query and change
'orderby' => 'meta_value'
to
'orderby' => 'meta_value_num'