I need to be able to sum up all values of a specific custom field and then get the total count.

For example, I have created a custom post type for reviews and each one has custom fields for 5 star rating.

What I need is to add up all the values of the star rating and divide by total count to give me the average.

Read more here: Sum and count of custom field values


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.


Wordpress related questions and answers: