I have an ACF number field that accepts decimal places. When I use WP_Query and order by the number field I get weird results. For example the following numbers..
6.4 17.7 29.8 146
are output in this order on the page..
146 17.7 29.8 6.4
Its like the ordering is being done by the first number in each value. Not sure why. Here is my WP_Query array...
$args = array(
'post_type' => 'point_of_interest',
'meta_query' => array( 'main_query' => array(
'key' => 'type',
'value' => 'structure'
), 'orderby_query' => array(
'key' => 'mile_marker',
)
),
'orderby' => array(
'orderby_query' => 'ASC',
),
'nopaging' => true
);