actually i am displaying like this. but this is displaying last five ratings only.but i want to display top five ratings from category ‘news id=9’ posts.`<ul>
<?php
query_posts($query_string . ‘&cat=9&meta_key=ratings’); ?>
<?php
$i=0;
if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<?php if ( function_exists(‘get_custom_field_value’) ){
$caticons_ratings=get_custom_field_value(‘ratings’, false);
//echo $caticons_ratings;
if($i<5)
{
if($caticons_ratings>5)
{
?>
<li><div class=”list_items_image”><div class=”attach_musicimg”><a href=”<?php echo get_bloginfo(url)?>?artist=<?php the_author(); ?>”><?php the_post_thumbnail(); ?></a></div></div><div class=”list_items_desc”>
<?php the_title(); ?><p><a href=”<?php echo get_bloginfo(url)?>?artist=<?php urlencode(the_author()); ?>” class=”pink_text”><?php the_author(); ?></a>
<br /><img src=”<?php bloginfo(‘stylesheet_directory’); ?>/images/star<?php echo $caticons_ratings;?>.gif” /> <?php echo $caticons_ratings.’/10′;?>
</p>
</div></li>
<?php $i++;}}}?>
<?php endwhile;?>
<?php endif; ?>
</ul>`