I'm Querying listings(custom post type) using WP_Query and ordering results by ACF meta field. The field contains price values with the currency symbol and comma separations like $100,000.
Here is the $args I'm passing to the WP_Query.
$args = array(
'post_type' => 'listing',
'post_status' => 'publish',
'posts_per_page' => -1,
'meta_key' => '_listing_price',
'orderby' => 'meta_value',
'order' => 'ASC'
);
$listing_query = new WP_Query($args);
This results:
$0 $0 $100,000 $150,000 $22,000 $320,300 $33,000 $359,000.
But I need result like this:
$0 $0 $22,000 $33,000 $100,000 $150,000 $320,300 $359,000.