How to Change the Default Algorithm for "Sort by Ratings"?
By default, GeoDirectory uses a weighted algorithm based on the Bayesian Average Rating system to sort listings by ratings.
The biggest advantage of our algorithm is that it is smart enough to prevent a listing with just one 5-star rating from appearing above another rating with, say, seventy 5-star and two 4-star ratings. If we were to sort listings by average ratings only, a single 5-star will yield an average of "5", whereas a rating with seventy 5-stars but just one 4-star will have an average lesser than "5".
However, if for some reason you do not wish to use the Bayesian Average for sorting listings, you can disable it using the following code snippet.
We recommend using the Code Snippets plugin to add PHP snippets to your site.
Code Snippet
/** * Disable Bayesian average method to sort by ratings.* * See https://www.google.com/search?q=bayesian+rating+sorting */ function gd_snippet_200611_disable_use_bayesian( $use_bayesian = true, $table = '' ) { return false; } add_filter( 'geodir_use_bayesian', 'gd_snippet_200611_disable_use_bayesian', 10, 2 ); add_filter( 'gd_use_bayesian', 'gd_snippet_200611_disable_use_bayesian', 10, 2 );