Here is my query args :
$query_args = array( 'post_type' => 'rented_properties', 'post_status' => 'publish', 'order' => 'DESC', // 'fields' => 'SUM(amount_to_paid)', ); $my_querys = null; $my_querys = new WP_Query($query_args);
My meta key is
amount_to_paid, and I want to get the sum all the meta_values of this query condition. Please suggest your answer with
My Scenario : I have 1000 posts and each with meta_key amount_to_paid and it has some value. Now I filter 20 posts and want to get sum of meta_value of amount_to_paid . Did you got me now?