Support » Plugins » Average of a posts meta

  • Hi,

    How can I get the average of a posts meta?

    I searching around the net – but with no useful result. Maybe the help is here?! Please give me some links or a answer of my problem, if you have.

    Here is my query:

    $average_args = array(
              'post_type' => 'post' ,
              'post_status' => 'publish' ,
              'cat' => 129 ,
              'meta_key' => rating' ,
              'meta_value' => ''
    );
    
    $get_average = new WP_Query( $average_args );
    //$average = $get_average->post_count;

    Thanks 🙂

  • The topic ‘Average of a posts meta’ is closed to new replies.