Title: Votes average
Last modified: August 21, 2016

---

# Votes average

 *  Resolved [netvision](https://wordpress.org/support/users/netvision/)
 * (@netvision)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/votes-average/)
 * Hi, I see the plugin creates two custom fields (for up and down votes) but I 
   need a third one which provides the average of these two fields. How can I achive
   this? You don’t have to update the plugin, please just give me an idea and I 
   will play with the codes. I need to order posts by the average of the votes. 
   I like your plugin a lot and do not want to look for another plugin, just gave
   5 stars!
 * [http://wordpress.org/plugins/thumbs-rating/](http://wordpress.org/plugins/thumbs-rating/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [Ricard Torres](https://wordpress.org/support/users/quicoto/)
 * (@quicoto)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/votes-average/#post-4326243)
 * Hi there netvision,
 * Thanks for the review!
 * Regarding your question, I think you need to store 2 more fields.
 * – Average
    – Number of posts affected
 * Although the second could be calculated every time you save the average I don’t
   know what’d be faster.
 * Every time somebody votes you have to update the average field (thumbs_rating_add_vote()
   function). It’s all there in the plugin source code.
 * Cheers.

Viewing 1 replies (of 1 total)

The topic ‘Votes average’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/thumbs-rating_d1a77d.svg)
 * [Thumbs Rating](https://wordpress.org/plugins/thumbs-rating/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/thumbs-rating/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/thumbs-rating/)
 * [Active Topics](https://wordpress.org/support/plugin/thumbs-rating/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/thumbs-rating/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/thumbs-rating/reviews/)

## Tags

 * [custom fields](https://wordpress.org/support/topic-tag/custom-fields/)
 * [vote](https://wordpress.org/support/topic-tag/vote/)

 * 1 reply
 * 2 participants
 * Last reply from: [Ricard Torres](https://wordpress.org/support/users/quicoto/)
 * Last activity: [12 years, 6 months ago](https://wordpress.org/support/topic/votes-average/#post-4326243)
 * Status: resolved