All posts have a post meta_value called rating. How can I show the ranking of a certain post based on this meta_value like this: Ranked 3 out of 12 post. Sorting on meta_value is no problem but then all post have to be shown, is it possible to only show the post place in this ranking on a single post?
I sort a list of post this way in the WP_Query, can this method be used to retrieve only the ranking of 1 post?
'orderby' => 'meta_value',
'meta_key' => 'rating'
Example:
Ranked <?php echo get_post_meta($post->ID, 'rating', true);?> out of 12 post.
For the current post.