Title: everten2's Replies | WordPress.org

---

# everten2

  [  ](https://wordpress.org/support/users/everten2/)

 *   [Profile](https://wordpress.org/support/users/everten2/)
 *   [Topics Started](https://wordpress.org/support/users/everten2/topics/)
 *   [Replies Created](https://wordpress.org/support/users/everten2/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/everten2/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/everten2/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/everten2/engagements/)
 *   [Favorites](https://wordpress.org/support/users/everten2/favorites/)

 Search replies:

## Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)

 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [write to custom field using sql statement](https://wordpress.org/support/topic/write-to-custom-field-using-sql-statement/)
 *  Thread Starter [everten2](https://wordpress.org/support/users/everten2/)
 * (@everten2)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/write-to-custom-field-using-sql-statement/#post-1399459)
 * I want to sort by the average. I have already been able to calculate and display
   the average on the fly by doing the following in the loop:
 * <?php
    $rating1 = get(‘customfield1’); $rating2 = get(‘customfield2’); $rating3
   = get(‘customfield3’); $rating4 = get(‘customfield4’); $rating5 = get(‘customfield5’);
 *  $totalRatings = $rating1+$rating2+$rating3+$rating4+$rating5;
    $totalVotes =
   5; $average = $totalRatings / $totalVotes; ?>
 * My ultimate objective is to be able to sort posts based on the the average.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Flutter retrieve possible field values](https://wordpress.org/support/topic/flutter-retrieve-possible-field-values/)
 *  Thread Starter [everten2](https://wordpress.org/support/users/everten2/)
 * (@everten2)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/flutter-retrieve-possible-field-values/#post-1392732)
 * I managed to achieve this by using [Custom Field List Widget](http://wordpress.org/extend/plugins/custom-field-list-widget/)
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Link to custom field query](https://wordpress.org/support/topic/link-to-custom-field-query/)
 *  Thread Starter [everten2](https://wordpress.org/support/users/everten2/)
 * (@everten2)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/link-to-custom-field-query/#post-1391973)
 * Nice. This is just what I needed. Thanks.

Viewing 3 replies - 1 through 3 (of 3 total)