How to orderby meta_value_num with dollar ($) sign
The custom fields all have prices including $ signs, and a dot as separator.
$theQuery = new WP_Query(array(
'orderby' = 'meta_value_num',
'meta_key' = 'price',
'order' = ASC
));
All formatted like this:
$24.95 $190.00 $1.40
They won't sort correctly due to the dollar sign, is it possible to ignore or remove the first character / $ sign in this WP_Query?
Topic wp-parse-args meta-query wp-query query sort Wordpress
Category Web