You should use 'orderby' => 'meta_value_num'
and 'meta_key' => 'rating'
as specified by the WordPress Codec. Using meta_value_num
with the assumption your ratings are numeric values
Reference: Orderby Parameters
You should use 'orderby' => 'meta_value_num'
and 'meta_key' => 'rating'
as specified by the WordPress Codec. Using meta_value_num
with the assumption your ratings are numeric values
Reference: Orderby Parameters