Right here is how I get the views for one submit:
perform getPostViews($postID){
$count_key = 'post_views_count';
$rely = get_post_meta($postID, $count_key, true);
if($rely==''){
delete_post_meta($postID, $count_key);
add_post_meta($postID, $count_key, '0');
return "0 View";
}
return $rely.' Views';
}
For instance I wish to discover essentially the most seen posts from 5,000 posts and I wish to present the highest 5 most seen posts.
How can I make a question to realize this?