Here is how I accomplished this using only one custom field. Instead of using "Stars" or "Hearts" as the custom field name and "1", "2", "3", etc. as the value, I used "Rating" as the name and "1 star", "2 stars", "3 stars", etc. (or hearts instead of stars) as the value. Since the unit of measurement is 0 thru 5 for both hearts and stars, I can sort by just the one custom field value of Rating and then parse out the value for display. Here is my code:
<?php
// setup the query
$args='&posts_per_page='.$con_review_num.'&post_type=con_movie_reviews&paged='.$paged.'&order=DESC&orderby='.$feedsort.'&meta_key=Rating';
$review_loop = new WP_Query($args);
if ($review_loop->have_posts()) : while ($review_loop->have_posts()) : $review_loop->the_post(); $postcount++;
// get the custom field value
$rating = get_post_meta($post->ID, "Rating", $single = true);
$unit = "star"; //default unit is star
if(strpos($rating," Hearts") || strpos($rating," hearts") || strpos($rating," Heart") || strpos($rating," heart")) {
$unit = "heart"; //find out if we're using hearts instead of stars
}
// extract just the number from the rating meta key
$rating = trim(str_replace(" star","",str_replace(" stars","",str_replace(" Star","",str_replace(" Stars","",str_replace(" heart","",str_replace(" hearts","",str_replace(" Heart","",str_replace(" Hearts","",$rating)))))))));
if($stars) { // are we using stars or hearts?
$rating = $stars;
$unit = "star";
} elseif($hearts) {
$rating = $hearts;
$unit = "heart";
}
?>
<div class="stars tooltip" title="<?php echo $rating; ?> / 5 <?php echo $overall; ?>">
<div class="<?php echo $unit; ?><?php if($rating>=1) { ?> full<?php } elseif($rating>0) { ?> half<?php } ?>"> </div>
<div class="<?php echo $unit; ?><?php if($rating>=2) { ?> full<?php } elseif($rating>1) { ?> half<?php } ?>"> </div>
<div class="<?php echo $unit; ?><?php if($rating>=3) { ?> full<?php } elseif($rating>2) { ?> half<?php } ?>"> </div>
<div class="<?php echo $unit; ?><?php if($rating>=4) { ?> full<?php } elseif($rating>3) { ?> half<?php } ?>"> </div>
<div class="<?php echo $unit; ?><?php if($rating>=5) { ?> full<?php } elseif($rating>4) { ?> half<?php } ?>"> </div>
</div>
<?php
}
endwhile;
endif;
?>