Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?php
/**
* For developers who wish to get an array of Posts ordered by rating, highest to lowest, the
* below code can be used.
*
* @param array $args WP_Query compatible arguments
*/
if ( function_exists( 'get_posts_ordered_by_rating' ) ) {
$posts = get_posts_ordered_by_rating( array(
'post_type' => 'post',
) );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.